{"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":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"f04e71e4-f3c3-533b-80df-5cd658a0ce28","task_key":"default--v0~2e1~2e0~5fhf--f04e71e4-f3c3-533b-80df-5cd658a0ce28","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f04e71e4-f3c3-533b-80df-5cd658a0ce28","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nimport random\\nfrom nltk.corpus import words\\nfrom random import sample\\n# Ensure the words corpus is downloaded\\nimport nltk\\nnltk.download('words')\\n# Constants\\nSAMPLE_ENGLISH_WORDS = set(words.words())  # Correct initialization\\ndef task_func(s, n):\\n\",\"complete_prompt\":\"import re\\nimport random\\nfrom nltk.corpus import words\\nfrom random import sample\\n\\n# Ensure the words corpus is downloaded\\nimport nltk\\nnltk.download('words')\\n\\n# Constants\\nSAMPLE_ENGLISH_WORDS = set(words.words())  # Correct initialization\\n\\ndef task_func(s, n):\\n    \\\"\\\"\\\"\\n    Extract up to n different English words from a string, ignoring case. \\n    The string is split into words and only the English words are retained.\\n    If there are fewer than n different English words, all distinct ones are returned.\\n    \\n    Parameters:\\n    - s (str): The string to extract words from.\\n    - n (int): The maximum number of different English words to extract.\\n    \\n    Returns:\\n    - List[str]: A list of up to n different English words found in the string.\\n\\n    Requirements:\\n    - re\\n    - nltk\\n    - random\\n    \\n    Example:\\n    Given the nature of random sampling, the specific output can vary.\\n    >>> s = 'This is an example string with some random words: Apple, banana, Test, hello, world'\\n    >>> len(task_func(s, 5)) <= 5\\n    True\\n    >>> set(task_func(\\\"apple Apple APPle\\\", 3)) == {\\\"apple\\\"}\\n    True\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Extract up to n different English words from a string, ignoring case. The string is split into words and only the English words are retained. If there are fewer than n different English words, all distinct ones are returned.\\nThe function should output with:\\n    List[str]: A list of up to n different English words found in the string.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nimport random\\nfrom nltk.corpus import words\\nfrom random import sample\\n# Ensure the words corpus is downloaded\\nimport nltk\\nnltk.download('words')\\n# Constants\\nSAMPLE_ENGLISH_WORDS = set(words.words())  # Correct initialization\\ndef task_func(s, n):\\n```\",\"libs\":\"['nltk', 'random', 're']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}