{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"43b82ea5-6e4b-5c9a-9257-dd661a33f3ba","task_key":"default--v0~2e1~2e0~5fhf--43b82ea5-6e4b-5c9a-9257-dd661a33f3ba","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 43b82ea5-6e4b-5c9a-9257-dd661a33f3ba","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nfrom sklearn.cluster import KMeans\\nfrom sklearn.feature_extraction.text import CountVectorizer\\ndef task_func(df):\\n\",\"complete_prompt\":\"import re\\nfrom sklearn.cluster import KMeans\\nfrom sklearn.feature_extraction.text import CountVectorizer\\n\\n\\ndef task_func(df):\\n    \\\"\\\"\\\"\\n    Analyzes articles by their titles for specific case-insensitive keywords (\\\"how\\\" or \\\"what\\\"), vectorizes the content using\\n    CountVectorizer, and groups them into clusters using KMeans clustering. This function is intended for basic\\n    content analysis and clustering to understand common themes or topics among articles asking questions starting\\n    with \\\"how\\\" or \\\"what\\\".\\n\\n    Parameters:\\n    df (pd.DataFrame): DataFrame containing article data with columns 'Title' for the article titles and 'Content' for\\n    the article text.\\n\\n    Returns:\\n    list: List of cluster labels for the filtered articles, indicating the cluster to which each article belongs.\\n\\n    Requirements:\\n    - re\\n    - sklearn\\n\\n    Example:\\n    >>> import pandas as pd\\n    >>> df_sample = pd.DataFrame({\\n    ...    'Title': ['How to code?', 'What is Python?', 'The art of programming', 'How to cook?', 'What is life?'],\\n    ...    'Content': ['This is a tutorial about coding...', 'Python is a programming language...',\\n    ...                'Programming is an art...', 'This is a cooking tutorial...', 'Life is complicated...']\\n    ... })\\n    >>> task_func(df_sample)\\n    [0, 1, 0, 1]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Analyzes articles by their titles for specific case-insensitive keywords (\\\"how\\\" or \\\"what\\\"), vectorizes the content using CountVectorizer, and groups them into clusters using KMeans clustering. This function is intended for basic content analysis and clustering to understand common themes or topics among articles asking questions starting with \\\"how\\\" or \\\"what\\\".\\nThe function should output with:\\n    list: List of cluster labels for the filtered articles, indicating the cluster to which each article belongs.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nfrom sklearn.cluster import KMeans\\nfrom sklearn.feature_extraction.text import CountVectorizer\\ndef task_func(df):\\n```\",\"libs\":\"['re', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}