repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_view_submission.py | test_mock_server_is_running | assert | none_literal | 129 | import json
from time import time
from urllib.parse import quote
from slack_sdk import WebClient
from slack_sdk.signature import SignatureVerifier
from slack_bolt import BoltRequest, BoltContext
from slack_bolt.app import App
from tests.mock_web_api_server import (
setup_mock_web_api_server,
cleanup_mock_web_... | None | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_workflow_steps_decorator_simple.py | edit | assert | none_literal | 20 | import json
import time as time_module
from time import time
from urllib.parse import quote
from slack_sdk.signature import SignatureVerifier
from slack_sdk.web import WebClient, SlackResponse
from slack_bolt import App, BoltRequest, Ack
from slack_bolt.workflows.step import Complete, Fail, Update, Configure, Workflo... | None | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/adapter_tests/socket_mode/test_interactions_builtin.py | test_interactions | assert | bool_literal | 63 | import logging
import time
from slack_sdk import WebClient
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
from .mock_socket_mode_server import (
start_socket_mode_server,
stop_socket_mode_server,
)
from .mock_web_api_server import (
setup_mock_web_api_server,
c... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/adapter_tests/socket_mode/test_interactions_websocket_client.py | test_interactions | assert | bool_literal | 62 | import logging
import time
from slack_sdk import WebClient
from slack_bolt import App
from slack_bolt.adapter.socket_mode.websocket_client import SocketModeHandler
from .mock_socket_mode_server import (
start_socket_mode_server,
stop_socket_mode_server,
)
from .mock_web_api_server import (
setup_mock_web_... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/adapter_tests/socket_mode/test_lazy_listeners.py | test_lazy_listener_calls | assert | bool_literal | 68 | import logging
import time
from slack_sdk import WebClient
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
from .mock_socket_mode_server import (
start_socket_mode_server,
stop_socket_mode_server,
)
from .mock_web_api_server import (
setup_mock_web_api_server,
c... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/adapter_tests_async/socket_mode/test_async_aiohttp.py | test_events | assert | bool_literal | 70 | import asyncio
import pytest
from slack_sdk.web.async_client import AsyncWebClient
from slack_bolt.adapter.socket_mode.aiohttp import AsyncSocketModeHandler
from slack_bolt.app.async_app import AsyncApp
from tests.mock_web_api_server import (
setup_mock_web_api_server,
cleanup_mock_web_api_server,
)
from test... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/adapter_tests_async/socket_mode/test_async_lazy_listeners.py | test_lazy_listeners | assert | bool_literal | 79 | import asyncio
import pytest
from slack_sdk.web.async_client import AsyncWebClient
from slack_bolt.adapter.socket_mode.aiohttp import AsyncSocketModeHandler
from slack_bolt.app.async_app import AsyncApp
from tests.mock_web_api_server import (
setup_mock_web_api_server,
cleanup_mock_web_api_server,
)
from test... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/adapter_tests_async/socket_mode/test_async_websockets.py | test_events | assert | bool_literal | 70 | import asyncio
import pytest
from slack_sdk.web.async_client import AsyncWebClient
from slack_bolt.adapter.socket_mode.websockets import AsyncSocketModeHandler
from slack_bolt.app.async_app import AsyncApp
from tests.mock_web_api_server import (
setup_mock_web_api_server,
cleanup_mock_web_api_server,
)
from t... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_app.py | test_proxy_ssl_for_respond | assert | bool_literal | 78 | import logging
import time
from concurrent.futures import Executor
from ssl import SSLContext
import pytest
from slack_sdk import WebClient
from slack_sdk.oauth.installation_store import FileInstallationStore
from slack_sdk.oauth.state_store import FileOAuthStateStore
from slack_bolt import App, Say, BoltRequest, Bol... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_app_using_methods_in_class.py | test_inspect_behaviors | assert | bool_literal | 55 | import inspect
import json
from time import time, sleep
from typing import Callable
from slack_sdk.signature import SignatureVerifier
from slack_sdk.web import WebClient
from slack_bolt import App, BoltRequest, Say, Ack, BoltContext
from tests.mock_web_api_server import (
setup_mock_web_api_server,
cleanup_mo... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_events_org_apps.py | test_team_access_granted | assert | bool_literal | 86 | import json
from time import time, sleep
from typing import Optional
from slack_sdk.oauth import InstallationStore
from slack_sdk.oauth.installation_store import Installation
from slack_sdk.signature import SignatureVerifier
from slack_sdk.web import WebClient
from slack_bolt import App, BoltRequest
from tests.mock_w... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_events_token_revocations.py | test_tokens_revoked | assert | bool_literal | 86 | import json
from time import time, sleep
from typing import Optional
import pytest as pytest
from slack_sdk.oauth import InstallationStore
from slack_sdk.oauth.installation_store import Installation
from slack_sdk.signature import SignatureVerifier
from slack_sdk.web import WebClient
from slack_bolt import App, BoltR... | True | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/slack_bolt/request/test_request.py | test_all_none_inputs_http | assert | collection | 17 | from urllib.parse import quote
from slack_bolt.request.request import BoltRequest
class TestRequest:
def setup_method(self):
pass
def teardown_method(self):
pass
def test_all_none_inputs_http(self):
req = BoltRequest(body=None, headers=None, query=None, context=None)
asse... | {} | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/slack_bolt_async/request/test_async_request.py | test_all_none_values_http | assert | collection | 12 | import pytest
from slack_bolt.request.async_request import AsyncBoltRequest
class TestAsyncRequest:
@pytest.mark.asyncio
async def test_all_none_values_http(self):
req = AsyncBoltRequest(body=None, headers=None, query=None, context=None)
assert req is not None
assert req.raw_body == ""... | {} | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests/test_error_handler.py | test_custom | assert | collection | 96 | import json
from time import time
from urllib.parse import quote
from slack_sdk import WebClient
from slack_sdk.signature import SignatureVerifier
from slack_bolt import BoltRequest, BoltResponse
from slack_bolt.app import App
from slack_bolt.error import BoltUnhandledRequestError
from tests.mock_web_api_server impor... | ["1"] | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/scenario_tests_async/test_error_handler.py | test_custom | assert | collection | 103 | import asyncio
import json
from time import time
from urllib.parse import quote
import pytest
from slack_sdk.signature import SignatureVerifier
from slack_sdk.web.async_client import AsyncWebClient
from slack_bolt import BoltResponse
from slack_bolt.async_app import AsyncApp
from slack_bolt.error import BoltUnhandled... | ["1"] | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/slack_bolt/context/test_ack.py | test_text | assert | collection | 54 | from slack_sdk.models.blocks import PlainTextObject, DividerBlock
from slack_sdk.models.views import View
from slack_bolt import Ack, BoltResponse
class TestAck:
def setup_method(self):
pass
def teardown_method(self):
pass
def test_text(self):
ack = Ack()
response: BoltRe... | (200, "foo") | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/slack_bolt_async/context/test_async_ack.py | test_text | assert | collection | 51 | import pytest
from slack_sdk.models.blocks import PlainTextObject, DividerBlock
from slack_sdk.models.views import View
from slack_bolt import BoltResponse
from slack_bolt.context.ack.async_ack import AsyncAck
class TestAsyncAsyncAck:
@pytest.mark.asyncio
async def test_text(self):
ack = AsyncAck()
... | (200, "foo") | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/slack_bolt/util/test_util.py | test_convert_to_dict | assert | collection | 20 | import sys
from typing import Set
import pytest
from slack_sdk.models import JsonObject
from slack_bolt.error import BoltError
from slack_bolt.util.utils import convert_to_dict, get_boot_message
from tests.utils import remove_os_env_temporarily, restore_os_env
class TestUtil:
def setup_method(self):
self... | {"foo": "bar"} | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
slackapi/bolt-python | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | train | train | tests/slack_bolt/util/test_util.py | test_convert_to_dict | assert | collection | 21 | import sys
from typing import Set
import pytest
from slack_sdk.models import JsonObject
from slack_bolt.error import BoltError
from slack_bolt.util.utils import convert_to_dict, get_boot_message
from tests.utils import remove_os_env_temporarily, restore_os_env
class TestUtil:
def setup_method(self):
self... | {"name": "baz"} | 8334d17ddac15b6e41cc15a6cce533745c20ba7d | 160 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_len | assert_* | numeric_literal | 57 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | 3) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_count | assert_* | numeric_literal | 57 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | 2) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_count | assert_* | numeric_literal | 58 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | 1) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_count | assert_* | numeric_literal | 59 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | 0) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_np_counts | assert_* | numeric_literal | 99 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | 6) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_sentences | assert_* | numeric_literal | 96 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | 19) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_blob.py | test_correct | assert_* | string_literal | 103 | from __future__ import unicode_literals
import json
from unittest import TestCase, main
from datetime import datetime
import mock
from nose.tools import * # noqa (PEP8 asserts)
from nose.plugins.attrib import attr
import nltk
from textblob.compat import PY2, unicode, basestring, binary_type
import textblob as tb
fro... | "?") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_init_with_csv_file | assert_* | string_literal | 51 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | 'pos') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_accuracy_on_a_csv_file | assert_* | variable | 51 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | float) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_classify | assert_* | string_literal | 50 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | 'positive') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_classify_a_list_of_words | assert_* | string_literal | 50 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | "positive") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_update | assert_* | variable | 55 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | new_length) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_init_with_custom_format | assert_* | variable | 66 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | redis_train) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_pseudocode | assert_* | string_literal | 50 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | "if" in code) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_classifiers.py | test_get_words_from_dataset | assert_* | func_call | 56 | import os
import unittest
import mock
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.tokenizers import WordTokenizer
from textblob.classifiers import (NaiveBayesClassifier, DecisionTreeClassifier,
basic_extractor, contains_extracto... | set(all_words)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_decorators.py | test_decorator_raises_missing_corpus_exception | assert_* | func_call | 11 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.decorators import requires_nltk_corpus
from textblob.exceptions import MissingCorpusError
def test_decorator_raises_missing_corpus_exception():
t = Tokenizer()
assert_raises(MissingCorpusError, | lambda: t.tag('hello world')) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_delimiter_defaults_to_comma | assert_* | string_literal | 17 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | ",") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_detect_csv | assert_* | complex_expr | 22 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | formats.CSV) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_detect_json | assert_* | complex_expr | 22 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | formats.JSON) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_register | assert_* | func_call | 25 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | registry.keys()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_register | assert_* | func_call | 24 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | registry.values()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_available | assert_* | string_literal | 21 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | 'csv' in registry.keys()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_available | assert_* | string_literal | 23 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | 'tsv' in registry.keys()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_available | assert_* | string_literal | 22 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | 'json' in registry.keys()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_to_iterable | assert_* | func_call | 22 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | isinstance(text, unicode)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_detect | assert_* | func_call | 19 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | formats.CSV.detect(stream)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_detect | assert_* | func_call | 19 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | formats.TSV.detect(stream)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_detect | assert_* | func_call | 19 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | formats.JSON.detect(stream)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_formats.py | test_register | assert_* | func_call | 20 | import os
import unittest
from nose.tools import * # noqa (PEP8 asserts)
from textblob import formats
from textblob.compat import unicode
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
JSON_FILE = os.path.join(HERE, "data.json")
TSV_FILE = os.path.join(HERE, "data.tsv")
... | CustomFormat in registry.values()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_filter_insignificant | assert_* | string_literal | 30 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
class TestConllExtractor(unitte... | 'DT' in tags) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_filter_insignificant | assert_* | string_literal | 33 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
class TestConllExtractor(unitte... | "DT" not in tags) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_cannot_instantiate_incomplete_extractor | assert_* | func_call | 14 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
def test_cannot_instantiate_inc... | lambda: BadExtractor()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_extract | assert_* | string_literal | 29 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
class TestConllExtractor(unitte... | "Python" in noun_phrases) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_extract | assert_* | string_literal | 31 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
class TestConllExtractor(unitte... | "code readability" in noun_phrases) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_parse_sentence | assert_* | func_call | 29 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
class TestConllExtractor(unitte... | isinstance(parsed, nltk.tree.Tree)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_np_extractor.py | test_extract | assert_* | string_literal | 30 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
import nltk
from textblob.base import BaseNPExtractor
from textblob.np_extractors import ConllExtractor
from textblob.utils import filter_insignificant
class TestConllExtractor(unitte... | "design philosophy" in noun_phrases) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_parsers.py | test_parse | assert_* | func_call | 15 | import unittest
from nose.tools import * # PEP8 asserts
from textblob.parsers import PatternParser
from textblob.en import parse as pattern_parse
class TestPatternParser(unittest.TestCase):
def setUp(self):
self.parser = PatternParser()
self.text = "And now for something completely different."
... | pattern_parse(self.text)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_analyze | assert_* | numeric_literal | 25 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestNaiveBayesAnalyzer(unittest.TestCase):
def setUp(self):
self.analyzer =... | 1) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_analyze | assert_* | string_literal | 19 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestNaiveBayesAnalyzer(unittest.TestCase):
def setUp(self):
self.analyzer =... | 'pos') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_analyze | assert_* | string_literal | 20 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestNaiveBayesAnalyzer(unittest.TestCase):
def setUp(self):
self.analyzer =... | 'neg') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | assert_about_equal | assert_* | variable | 10 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
def assert_about_equal(first, second, places=4):
return assert_equal(round(first, places)... | second) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_kind | assert_* | variable | 15 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestNaiveBayesAnalyzer(unittest.TestCase):
def setUp(self):
self.analyzer =... | DISCRETE) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_kind | assert_* | variable | 15 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestPatternSentiment(unittest.TestCase):
def setUp(self):
self.analyzer = P... | CONTINUOUS) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_analyze | assert_* | complex_expr | 21 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestPatternSentiment(unittest.TestCase):
def setUp(self):
self.analyzer = P... | p1_result[0]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_sentiments.py | test_analyze | assert_* | complex_expr | 22 | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestPatternSentiment(unittest.TestCase):
def setUp(self):
self.analyzer = P... | p1_result[1]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_taggers.py | test_cannot_instantiate_incomplete_tagger | assert_* | func_call | 18 | from __future__ import unicode_literals
import os
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.base import BaseTagger
import textblob.taggers
HERE = os.path.abspath(os.path.dirname(__file__))
AP_MODEL_LOC = os.path.join(HERE, 'trontagger.pickle')
def tes... | lambda: BadTagger()) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_taggers.py | test_init | assert_* | func_call | 23 | from __future__ import unicode_literals
import os
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.base import BaseTagger
import textblob.taggers
HERE = os.path.abspath(os.path.dirname(__file__))
AP_MODEL_LOC = os.path.join(HERE, 'trontagger.pickle')
class T... | isinstance(tagger, textblob.taggers.BaseTagger)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_taggers.py | test_tag | assert_* | collection | 23 | from __future__ import unicode_literals
import os
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.base import BaseTagger
import textblob.taggers
HERE = os.path.abspath(os.path.dirname(__file__))
AP_MODEL_LOC = os.path.join(HERE, 'trontagger.pickle')
class T... | [('Simple', 'JJ'), ('is', 'VBZ'), ('better', 'JJR'), ('than', 'IN'), ('complex', 'JJ'), ('.', '.'), ('Complex', 'NNP'), ('is', 'VBZ'), ('better', 'JJR'), ('than', 'IN'), ('complicated', 'VBN'), ('.', '.')]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_taggers.py | test_tag | assert_* | collection | 23 | from __future__ import unicode_literals
import os
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.base import BaseTagger
import textblob.taggers
HERE = os.path.abspath(os.path.dirname(__file__))
AP_MODEL_LOC = os.path.join(HERE, 'trontagger.pickle')
class T... | [('Simple', 'NNP'), ('is', 'VBZ'), ('better', 'JJR'), ('than', 'IN'), ('complex', 'JJ'), ('.', '.'), ('Complex', 'NNP'), ('is', 'VBZ'), ('better', 'JJR'), ('than', 'IN'), ('complicated', 'JJ'), ('.', '.')]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_tokenize_with_multiple_punctuation | assert_* | numeric_literal | 28 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | 2) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_itokenize | assert_* | string_literal | 27 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | "is") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_itokenize | assert_* | string_literal | 26 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | "Python") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_word_tokenize | assert_* | func_call | 26 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | is_generator(tokens)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_tokenize_with_multiple_punctuation | assert_* | collection | 29 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | ["OMG!", "I am soooo LOL!!!"]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_itokenize | assert_* | string_literal | 23 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | "Beautiful is better than ugly.") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_itokenize | assert_* | string_literal | 24 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | "Simple is better than complex.") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_word_tokenize | assert_* | func_call | 27 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | self.tokenizer.tokenize(self.text)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_tokenize_with_multiple_punctuation | assert_* | collection | 24 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | ["Hello world.", "How do you do?!", "My name's Steve..."]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_tokenize | assert_* | collection | 22 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | ["Beautiful is better than ugly.", "Simple is better than complex."]) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_exclude_punc | assert_* | collection | 25 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | ['Python', 'is', 'a', 'high-level', 'programming', 'language']) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_tokenizers.py | test_tokenize | assert_* | collection | 25 | import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
from textblob.tokenizers import WordTokenizer, SentenceTokenizer, word_tokenize, sent_tokenize
from textblob.compat import PY2
def is_generator(obj):
if PY2:
return hasattr(obj, 'next')
else:
return h... | ['Python', 'is', 'a', 'high-level', 'programming', 'language', '.']) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_unescape | assert_* | string_literal | 15 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
def test_unescape():
assert_eq... | '&') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_parses_json5 | assert_* | string_literal | 24 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "en") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_parses_json5 | assert_* | string_literal | 44 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "es") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_non_ascii | assert_* | string_literal | 24 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "bg") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_non_ascii | assert_* | string_literal | 26 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "ru") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_unescape | assert_* | string_literal | 14 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
def test_unescape():
assert_e... | 'and') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_non_ascii | assert_* | string_literal | 22 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | 'zh-CN') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate_non_ascii | assert_* | string_literal | 23 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "Fully sovereign") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate | assert_* | string_literal | 31 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "Esta es una frase") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate | assert_* | string_literal | 37 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "Esta es una frase.") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate_unicode_escape | assert_* | string_literal | 23 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "Jenner & Block LLP") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate | assert_* | string_literal | 40 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "This is a sentence.") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate | assert_* | complex_expr | 32 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | mock_get_json5.called_once) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_translate_non_ascii | assert_* | string_literal | 27 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | "Beautiful is better than ugly") | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_requires_more_than_two_characters | assert_* | func_call | 20 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | lambda: self.translator.detect('f')) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_translate.py | test_detect_requires_more_than_two_characters | assert_* | func_call | 21 | from __future__ import unicode_literals
import unittest
from nose.plugins.attrib import attr
from nose.tools import * # PEP8 asserts
import mock
from textblob.translate import Translator, _unescape
from textblob.compat import unicode
from textblob.exceptions import TranslatorError
class TestTranslator(unittest.Test... | lambda: self.translator.detect('fo')) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_utils.py | test_is_filelike | assert_* | func_call | 14 | from unittest import TestCase
import os
from nose.tools import * # PEP8 asserts
from textblob.utils import lowerstrip, strip_punc, is_filelike
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
def test_is_filelike():
with open(CSV_FILE) as fp:
assert_true( | is_filelike(fp)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_utils.py | test_is_filelike | assert_* | func_call | 16 | from unittest import TestCase
import os
from nose.tools import * # PEP8 asserts
from textblob.utils import lowerstrip, strip_punc, is_filelike
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
def test_is_filelike():
with open(CSV_FILE) as fp:
assert_true(is_fi... | is_filelike(12.3)) | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
sloria/TextBlob | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | train | train | tests/test_utils.py | test_strip_punc_all | assert_* | string_literal | 17 | from unittest import TestCase
import os
from nose.tools import * # PEP8 asserts
from textblob.utils import lowerstrip, strip_punc, is_filelike
HERE = os.path.abspath(os.path.dirname(__file__))
CSV_FILE = os.path.join(HERE, 'data.csv')
class UtilsTests(TestCase):
def setUp(self):
self.text = "this. Has.... | 'this Has Punctuation') | 94acdf782ee21458c8d2f3c645653ed32c8b8512 | 107 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.