SYMBOL INDEX (629 symbols across 29 files) FILE: docs/_themes/flask_theme_support.py class FlaskyStyle (line 19) | class FlaskyStyle(Style): FILE: src/textblob/_text.py function decode_string (line 34) | def decode_string(v, encoding="utf-8"): function encode_string (line 48) | def encode_string(v, encoding="utf-8"): function isnumeric (line 66) | def isnumeric(strg): class lazydict (line 79) | class lazydict(dict): method load (line 80) | def load(self): method _lazy (line 85) | def _lazy(self, method, *args): method __repr__ (line 94) | def __repr__(self): method __len__ (line 97) | def __len__(self): method __iter__ (line 100) | def __iter__(self): method __contains__ (line 103) | def __contains__(self, *args): method __getitem__ (line 106) | def __getitem__(self, *args): method __setitem__ (line 109) | def __setitem__(self, *args): method setdefault (line 112) | def setdefault(self, *args): method get (line 115) | def get(self, *args, **kwargs): method items (line 118) | def items(self): method keys (line 121) | def keys(self): method values (line 124) | def values(self): method update (line 127) | def update(self, *args, **kwargs): method pop (line 130) | def pop(self, *args): method popitem (line 133) | def popitem(self, *args): class lazylist (line 137) | class lazylist(list): method load (line 138) | def load(self): method _lazy (line 143) | def _lazy(self, method, *args): method __repr__ (line 152) | def __repr__(self): method __len__ (line 155) | def __len__(self): method __iter__ (line 158) | def __iter__(self): method __contains__ (line 161) | def __contains__(self, *args): method insert (line 164) | def insert(self, *args): method append (line 167) | def append(self, *args): method extend (line 170) | def extend(self, *args): method remove (line 173) | def remove(self, *args): method pop (line 176) | def pop(self, *args): function penntreebank2universal (line 213) | def penntreebank2universal(token, tag): function find_tokens (line 350) | def find_tokens( function _read (line 459) | def _read(path, encoding="utf-8", comment=";;;"): class Lexicon (line 489) | class Lexicon(lazydict): method __init__ (line 490) | def __init__( method load (line 508) | def load(self): method path (line 513) | def path(self): method language (line 517) | def language(self): class Rules (line 527) | class Rules: method __init__ (line 528) | def __init__(self, lexicon=None, cmd=None): method apply (line 535) | def apply(self, x): class Morphology (line 540) | class Morphology(lazylist, Rules): method __init__ (line 541) | def __init__(self, lexicon=None, path=""): method path (line 562) | def path(self): method load (line 565) | def load(self): method apply (line 569) | def apply(self, token, previous=(None, None), next=(None, None)): method insert (line 601) | def insert(self, i, tag, affix, cmd="hassuf", tagged=None): method append (line 617) | def append(self, *args, **kwargs): method extend (line 620) | def extend(self, rules=None): class Context (line 632) | class Context(lazylist, Rules): method __init__ (line 633) | def __init__(self, lexicon=None, path=""): method path (line 670) | def path(self): method load (line 673) | def load(self): method apply (line 677) | def apply(self, tokens): method insert (line 727) | def insert(self, i, tag1, tag2, cmd="prevtag", x=None, y=None, *args): method append (line 739) | def append(self, *args, **kwargs): method extend (line 742) | def extend(self, rules=None, *args): class Entities (line 756) | class Entities(lazydict, Rules): method __init__ (line 757) | def __init__(self, lexicon=None, path="", tag="NNP"): method path (line 773) | def path(self): method load (line 776) | def load(self): method apply (line 783) | def apply(self, tokens): method append (line 815) | def append(self, entity, name="pers"): method extend (line 822) | def extend(self, entities): function avg (line 854) | def avg(list): class Score (line 858) | class Score(tuple): method __new__ (line 859) | def __new__(self, polarity, subjectivity, assessments=None): method __init__ (line 865) | def __init__(self, polarity, subjectivity, assessments=None): class Sentiment (line 871) | class Sentiment(lazydict): method __init__ (line 872) | def __init__(self, path="", language=None, synset=None, confidence=Non... method path (line 890) | def path(self): method language (line 894) | def language(self): method confidence (line 898) | def confidence(self): method load (line 901) | def load(self, path=None): method synset (line 951) | def synset(self, id, pos=ADJECTIVE): method __call__ (line 970) | def __call__(self, s, negation=True, **kwargs): method assessments (line 1048) | def assessments(self, words=None, negation=True): method annotate (line 1136) | def annotate( function _suffix_rules (line 1154) | def _suffix_rules(token, tag="NN"): function find_tags (line 1178) | def find_tags( function find_chunks (line 1316) | def find_chunks(tagged, language="en"): function find_prepositions (line 1360) | def find_prepositions(chunked): class Parser (line 1424) | class Parser: method __init__ (line 1425) | def __init__(self, lexicon=None, default=("NN", "NNP", "CD"), language... method find_tokens (line 1440) | def find_tokens(self, string, **kwargs): method find_tags (line 1453) | def find_tags(self, tokens, **kwargs): method find_chunks (line 1466) | def find_chunks(self, tokens, **kwargs): method find_prepositions (line 1476) | def find_prepositions(self, tokens, **kwargs): method find_labels (line 1480) | def find_labels(self, tokens, **kwargs): method find_lemmata (line 1484) | def find_lemmata(self, tokens, **kwargs): method parse (line 1488) | def parse( class TaggedString (line 1573) | class TaggedString(str): method __new__ (line 1574) | def __new__(cls, string, tags=None, language=None): method split (line 1595) | def split(self, sep=TOKENS): class Spelling (line 1616) | class Spelling(lazydict): method __init__ (line 1619) | def __init__(self, path=""): method load (line 1622) | def load(self): method path (line 1628) | def path(self): method language (line 1632) | def language(self): method train (line 1636) | def train(cls, s, path="spelling.txt"): method _edit1 (line 1649) | def _edit1(self, w): method _edit2 (line 1662) | def _edit2(self, w): method _known (line 1668) | def _known(self, words=None): method suggest (line 1674) | def suggest(self, w): FILE: src/textblob/base.py class BaseTagger (line 21) | class BaseTagger(metaclass=ABCMeta): method tag (line 28) | def tag(self, text: str, tokenize=True) -> list[tuple[str, str]]: class BaseNPExtractor (line 38) | class BaseNPExtractor(metaclass=ABCMeta): method extract (line 45) | def extract(self, text: str) -> list[str]: class BaseTokenizer (line 53) | class BaseTokenizer(nltk.tokenize.api.TokenizerI, metaclass=ABCMeta): #... method tokenize (line 60) | def tokenize(self, text: str) -> list[str]: method itokenize (line 67) | def itokenize(self, text: str, *args, **kwargs): class BaseSentimentAnalyzer (line 84) | class BaseSentimentAnalyzer(metaclass=ABCMeta): method __init__ (line 94) | def __init__(self): method train (line 97) | def train(self): method analyze (line 102) | def analyze(self, text) -> Any: class BaseParser (line 116) | class BaseParser(metaclass=ABCMeta): method parse (line 122) | def parse(self, text: AnyStr): FILE: src/textblob/blob.py function _penn_to_wordnet (line 55) | def _penn_to_wordnet(tag): class Word (line 68) | class Word(str): method __new__ (line 73) | def __new__(cls, string, pos_tag=None): method __init__ (line 80) | def __init__(self, string, pos_tag=None): method __repr__ (line 84) | def __repr__(self): method __str__ (line 87) | def __str__(self): method singularize (line 90) | def singularize(self): method pluralize (line 94) | def pluralize(self): method spellcheck (line 98) | def spellcheck(self): method correct (line 109) | def correct(self): method lemma (line 119) | def lemma(self): method lemmatize (line 124) | def lemmatize(self, pos=None): method stem (line 147) | def stem(self, stemmer=PorterStemmer): method synsets (line 155) | def synsets(self): method definitions (line 165) | def definitions(self): method get_synsets (line 173) | def get_synsets(self, pos=None): method define (line 185) | def define(self, pos=None): class WordList (line 198) | class WordList(list): method __init__ (line 201) | def __init__(self, collection): method __str__ (line 207) | def __str__(self): method __repr__ (line 211) | def __repr__(self): method __getitem__ (line 216) | def __getitem__(self, key): method __getslice__ (line 224) | def __getslice__(self, i, j): method __setitem__ (line 228) | def __setitem__(self, index, obj): method count (line 237) | def count(self, strg, case_sensitive=False, *args, **kwargs): method append (line 247) | def append(self, obj): method extend (line 256) | def extend(self, iterable): method upper (line 263) | def upper(self): method lower (line 267) | def lower(self): method singularize (line 271) | def singularize(self): method pluralize (line 275) | def pluralize(self): method lemmatize (line 279) | def lemmatize(self): method stem (line 283) | def stem(self, *args, **kwargs): function _validated_param (line 288) | def _validated_param(obj, name, base_class, default, base_class_name=None): function _initialize_models (line 303) | def _initialize_models( class BaseBlob (line 331) | class BaseBlob(StringlikeMixin, BlobComparableMixin): method __init__ (line 359) | def __init__( method words (line 388) | def words(self): method tokens (line 398) | def tokens(self): method tokenize (line 404) | def tokenize(self, tokenizer=None): method parse (line 413) | def parse(self, parser=None): method classify (line 424) | def classify(self): method sentiment (line 431) | def sentiment(self): method sentiment_assessments (line 442) | def sentiment_assessments(self): method polarity (line 455) | def polarity(self): method subjectivity (line 463) | def subjectivity(self): method noun_phrases (line 472) | def noun_phrases(self): method pos_tags (line 483) | def pos_tags(self): method word_counts (line 516) | def word_counts(self): method np_counts (line 525) | def np_counts(self): method ngrams (line 532) | def ngrams(self, n=3): method correct (line 545) | def correct(self): method _cmpkey (line 558) | def _cmpkey(self): method _strkey (line 564) | def _strkey(self): method __hash__ (line 568) | def __hash__(self): method __add__ (line 571) | def __add__(self, other): method split (line 587) | def split(self, sep=None, maxsplit=sys.maxsize): class TextBlob (line 596) | class TextBlob(BaseBlob): method sentences (line 613) | def sentences(self): method words (line 618) | def words(self): method raw_sentences (line 628) | def raw_sentences(self): method serialized (line 633) | def serialized(self): method to_json (line 637) | def to_json(self, *args, **kwargs): method json (line 646) | def json(self): method _create_sentence_objects (line 655) | def _create_sentence_objects(self): class Sentence (line 682) | class Sentence(BaseBlob): method __init__ (line 693) | def __init__(self, sentence, start_index=0, end_index=None, *args, **k... method dict (line 701) | def dict(self): class Blobber (line 714) | class Blobber: method __init__ (line 750) | def __init__( method __call__ (line 763) | def __call__(self, text): method __repr__ (line 779) | def __repr__(self): FILE: src/textblob/classifiers.py function _get_words_from_dataset (line 49) | def _get_words_from_dataset(dataset): function _get_document_tokens (line 68) | def _get_document_tokens(document): function basic_extractor (line 79) | def basic_extractor(document, train_set): function contains_extractor (line 106) | def contains_extractor(document): class BaseClassifier (line 118) | class BaseClassifier: method __init__ (line 139) | def __init__( method _read_data (line 153) | def _read_data(self, dataset, format=None): method classifier (line 172) | def classifier(self): method classify (line 176) | def classify(self, text): method train (line 180) | def train(self, labeled_featureset): method labels (line 184) | def labels(self): method extract_features (line 188) | def extract_features(self, text): class NLTKClassifier (line 200) | class NLTKClassifier(BaseClassifier): method __init__ (line 215) | def __init__( method __repr__ (line 221) | def __repr__(self): method classifier (line 226) | def classifier(self): method train (line 235) | def train(self, *args, **kwargs): method labels (line 256) | def labels(self): method classify (line 260) | def classify(self, text): method accuracy (line 268) | def accuracy(self, test_set, format=None): method update (line 284) | def update(self, new_data, *args, **kwargs): class NaiveBayesClassifier (line 305) | class NaiveBayesClassifier(NLTKClassifier): method prob_classify (line 323) | def prob_classify(self, text): method informative_features (line 342) | def informative_features(self, *args, **kwargs): method show_informative_features (line 350) | def show_informative_features(self, *args, **kwargs): class DecisionTreeClassifier (line 359) | class DecisionTreeClassifier(NLTKClassifier): method pretty_format (line 377) | def pretty_format(self, *args, **kwargs): method pseudocode (line 389) | def pseudocode(self, *args, **kwargs): class PositiveNaiveBayesClassifier (line 398) | class PositiveNaiveBayesClassifier(NLTKClassifier): method __init__ (line 440) | def __init__( method __repr__ (line 455) | def __repr__(self): method train (line 463) | def train(self, *args, **kwargs): method update (line 477) | def update( class MaxEntClassifier (line 512) | class MaxEntClassifier(NLTKClassifier): method prob_classify (line 516) | def prob_classify(self, text): FILE: src/textblob/decorators.py class cached_property (line 17) | class cached_property: method __init__ (line 25) | def __init__(self, func): method __get__ (line 29) | def __get__(self, obj, cls): function requires_nltk_corpus (line 36) | def requires_nltk_corpus( FILE: src/textblob/download_corpora.py function download_lite (line 34) | def download_lite(): function download_all (line 39) | def download_all(): function main (line 44) | def main(): FILE: src/textblob/en/__init__.py function find_lemmata (line 20) | def find_lemmata(tokens): class Parser (line 36) | class Parser(_Parser): method find_lemmata (line 37) | def find_lemmata(self, tokens, **kwargs): method find_tags (line 40) | def find_tags(self, tokens, **kwargs): class Sentiment (line 50) | class Sentiment(_Sentiment): method load (line 51) | def load(self, path=None): function tokenize (line 85) | def tokenize(s, *args, **kwargs): function parse (line 90) | def parse(s, *args, **kwargs): function parsetree (line 95) | def parsetree(s, *args, **kwargs): function split (line 100) | def split(s, token=None): function tag (line 107) | def tag(s, tokenize=True, encoding="utf-8"): function suggest (line 116) | def suggest(w): function polarity (line 121) | def polarity(s, **kwargs): function subjectivity (line 126) | def subjectivity(s, **kwargs): function positive (line 131) | def positive(s, threshold=0.1, **kwargs): FILE: src/textblob/en/inflect.py function pluralize (line 534) | def pluralize(word: str, pos=NOUN, custom=None, classical=True) -> str: function singularize (line 847) | def singularize(word: str, pos=NOUN, custom: MutableMapping[str, str] | ... FILE: src/textblob/en/np_extractors.py class ChunkParser (line 11) | class ChunkParser(nltk.ChunkParserI): method __init__ (line 14) | def __init__(self): method train (line 18) | def train(self): method parse (line 30) | def parse(self, tokens): class ConllExtractor (line 44) | class ConllExtractor(BaseNPExtractor): method __init__ (line 63) | def __init__(self, parser=None): method extract (line 66) | def extract(self, text): method _parse_sentence (line 86) | def _parse_sentence(self, sentence): class FastNPExtractor (line 92) | class FastNPExtractor(BaseNPExtractor): method __init__ (line 110) | def __init__(self): method train (line 114) | def train(self): method _tokenize_sentence (line 137) | def _tokenize_sentence(self, sentence): method extract (line 142) | def extract(self, text): function _normalize_tags (line 173) | def _normalize_tags(chunk): function _is_match (line 192) | def _is_match(tagged_phrase, cfg): FILE: src/textblob/en/parsers.py class PatternParser (line 9) | class PatternParser(BaseParser): method parse (line 14) | def parse(self, text): FILE: src/textblob/en/sentiments.py class PatternAnalyzer (line 15) | class PatternAnalyzer(BaseSentimentAnalyzer): method analyze (line 30) | def analyze(self, text, keep_assessments=False): function _default_feature_extractor (line 48) | def _default_feature_extractor(words): class NaiveBayesAnalyzer (line 53) | class NaiveBayesAnalyzer(BaseSentimentAnalyzer): method __init__ (line 66) | def __init__(self, feature_extractor=_default_feature_extractor): method train (line 72) | def train(self): method analyze (line 94) | def analyze(self, text): FILE: src/textblob/en/taggers.py class PatternTagger (line 11) | class PatternTagger(BaseTagger): method tag (line 17) | def tag(self, text, tokenize=True): class NLTKTagger (line 24) | class NLTKTagger(BaseTagger): method tag (line 30) | def tag(self, text): FILE: src/textblob/exceptions.py class TextBlobError (line 13) | class TextBlobError(Exception): class MissingCorpusError (line 22) | class MissingCorpusError(TextBlobError): method __init__ (line 27) | def __init__(self, message=MISSING_CORPUS_MESSAGE, *args, **kwargs): class DeprecationError (line 34) | class DeprecationError(TextBlobError): class TranslatorError (line 40) | class TranslatorError(TextBlobError): class NotTranslated (line 46) | class NotTranslated(TranslatorError): class FormatError (line 54) | class FormatError(TextBlobError): FILE: src/textblob/formats.py class BaseFormat (line 35) | class BaseFormat: method __init__ (line 45) | def __init__(self, fp, **kwargs): method to_iterable (line 48) | def to_iterable(self): method detect (line 53) | def detect(cls, stream: str): class DelimitedFormat (line 63) | class DelimitedFormat(BaseFormat): method __init__ (line 69) | def __init__(self, fp, **kwargs): method to_iterable (line 74) | def to_iterable(self): method detect (line 79) | def detect(cls, stream): class CSV (line 88) | class CSV(DelimitedFormat): class TSV (line 99) | class TSV(DelimitedFormat): class JSON (line 105) | class JSON(BaseFormat): method __init__ (line 118) | def __init__(self, fp, **kwargs): method to_iterable (line 122) | def to_iterable(self): method detect (line 127) | def detect(cls, stream: str | bytes | bytearray): function detect (line 145) | def detect(fp, max_read=1024): function get_registry (line 160) | def get_registry(): function register (line 165) | def register(name, format_class): FILE: src/textblob/mixins.py class ComparableMixin (line 4) | class ComparableMixin: method _cmpkey (line 7) | def _cmpkey(self): method _compare (line 10) | def _compare(self, other, method): method __lt__ (line 18) | def __lt__(self, other): method __le__ (line 21) | def __le__(self, other): method __eq__ (line 24) | def __eq__(self, other): method __ge__ (line 27) | def __ge__(self, other): method __gt__ (line 30) | def __gt__(self, other): method __ne__ (line 33) | def __ne__(self, other): class BlobComparableMixin (line 37) | class BlobComparableMixin(ComparableMixin): method _compare (line 40) | def _compare(self, other, method): class StringlikeMixin (line 47) | class StringlikeMixin: method _strkey (line 55) | def _strkey(self) -> str: method __repr__ (line 58) | def __repr__(self): method __str__ (line 64) | def __str__(self): method __len__ (line 69) | def __len__(self): method __iter__ (line 73) | def __iter__(self): method __contains__ (line 79) | def __contains__(self, sub): method __getitem__ (line 83) | def __getitem__(self, index): method find (line 94) | def find(self, sub, start=0, end=sys.maxsize): method rfind (line 101) | def rfind(self, sub, start=0, end=sys.maxsize): method index (line 108) | def index(self, sub, start=0, end=sys.maxsize): method rindex (line 114) | def rindex(self, sub, start=0, end=sys.maxsize): method startswith (line 120) | def startswith(self, prefix, start=0, end=sys.maxsize): method endswith (line 124) | def endswith(self, suffix, start=0, end=sys.maxsize): method title (line 132) | def title(self): method format (line 136) | def format(self, *args, **kwargs): method split (line 142) | def split(self, sep=None, maxsplit=sys.maxsize): method strip (line 146) | def strip(self, chars=None): method upper (line 152) | def upper(self): method lower (line 156) | def lower(self): method join (line 160) | def join(self, iterable): method replace (line 169) | def replace(self, old, new, count=sys.maxsize): FILE: src/textblob/tokenizers.py class WordTokenizer (line 15) | class WordTokenizer(BaseTokenizer): method tokenize (line 27) | def tokenize(self, text, include_punc=True): class SentenceTokenizer (line 50) | class SentenceTokenizer(BaseTokenizer): method tokenize (line 58) | def tokenize(self, text): function word_tokenize (line 69) | def word_tokenize(text, include_punc=True, *args, **kwargs): FILE: src/textblob/utils.py function strip_punc (line 13) | def strip_punc(s: str, all=False): function lowerstrip (line 26) | def lowerstrip(s: str, all=False): function tree2str (line 36) | def tree2str(tree, concat=" "): function filter_insignificant (line 45) | def filter_insignificant( function is_filelike (line 61) | def is_filelike(obj): FILE: tests/test_blob.py class WordListTest (line 49) | class WordListTest(TestCase): method setUp (line 50) | def setUp(self): method test_len (line 54) | def test_len(self): method test_slicing (line 58) | def test_slicing(self): method test_repr (line 68) | def test_repr(self): method test_slice_repr (line 72) | def test_slice_repr(self): method test_str (line 76) | def test_str(self): method test_singularize (line 80) | def test_singularize(self): method test_pluralize (line 86) | def test_pluralize(self): method test_lemmatize (line 91) | def test_lemmatize(self): method test_stem (line 95) | def test_stem(self): # only PorterStemmer tested method test_upper (line 99) | def test_upper(self): method test_lower (line 103) | def test_lower(self): method test_count (line 107) | def test_count(self): method test_convert_to_list (line 113) | def test_convert_to_list(self): method test_append (line 117) | def test_append(self): method test_extend (line 124) | def test_extend(self): method test_pop (line 130) | def test_pop(self): method test_setitem (line 140) | def test_setitem(self): method test_reverse (line 145) | def test_reverse(self): class SentenceTest (line 151) | class SentenceTest(TestCase): method setUp (line 152) | def setUp(self): method test_repr (line 156) | def test_repr(self): method test_stripped_sentence (line 159) | def test_stripped_sentence(self): method test_len (line 165) | def test_len(self): method test_dict (line 169) | def test_dict(self): method test_pos_tags (line 181) | def test_pos_tags(self): method test_noun_phrases (line 209) | def test_noun_phrases(self): method test_words_are_word_objects (line 213) | def test_words_are_word_objects(self): method test_string_equality (line 218) | def test_string_equality(self): method test_correct (line 221) | def test_correct(self): class TextBlobTest (line 230) | class TextBlobTest(TestCase): method setUp (line 231) | def setUp(self): method test_init (line 273) | def test_init(self): method test_string_equality (line 283) | def test_string_equality(self): method test_string_comparison (line 287) | def test_string_comparison(self): method test_hash (line 292) | def test_hash(self): method test_stripped (line 297) | def test_stripped(self): method test_ngrams (line 301) | def test_ngrams(self): method test_clean_html (line 315) | def test_clean_html(self): method test_sentences (line 327) | def test_sentences(self): method test_senences_with_space_before_punctuation (line 332) | def test_senences_with_space_before_punctuation(self): method test_sentiment_of_foreign_text (line 337) | def test_sentiment_of_foreign_text(self): method test_iter (line 346) | def test_iter(self): method test_raw_sentences (line 350) | def test_raw_sentences(self): method test_blob_with_no_sentences (line 355) | def test_blob_with_no_sentences(self): method test_len (line 364) | def test_len(self): method test_repr (line 368) | def test_repr(self): method test_cmp (line 372) | def test_cmp(self): method test_invalid_comparison (line 383) | def test_invalid_comparison(self): method test_words (line 389) | def test_words(self): method test_words_includes_apostrophes_in_contractions (line 411) | def test_words_includes_apostrophes_in_contractions(self): method test_pos_tags (line 419) | def test_pos_tags(self): method test_tags (line 436) | def test_tags(self): method test_tagging_nonascii (line 439) | def test_tagging_nonascii(self): method test_pos_tags_includes_one_letter_articles (line 447) | def test_pos_tags_includes_one_letter_articles(self): method test_np_extractor_defaults_to_fast_tagger (line 452) | def test_np_extractor_defaults_to_fast_tagger(self): method test_np_extractor_is_shared_among_instances (line 457) | def test_np_extractor_is_shared_among_instances(self): method test_can_use_different_np_extractors (line 463) | def test_can_use_different_np_extractors(self): method test_can_use_different_sentanalyzer (line 470) | def test_can_use_different_sentanalyzer(self): method test_discrete_sentiment (line 475) | def test_discrete_sentiment(self): method test_can_get_subjectivity_and_polarity_with_different_analyzer (line 479) | def test_can_get_subjectivity_and_polarity_with_different_analyzer(self): method test_pos_tagger_defaults_to_pattern (line 485) | def test_pos_tagger_defaults_to_pattern(self): method test_pos_tagger_is_shared_among_instances (line 489) | def test_pos_tagger_is_shared_among_instances(self): method test_can_use_different_pos_tagger (line 494) | def test_can_use_different_pos_tagger(self): method test_can_pass_np_extractor_to_constructor (line 500) | def test_can_pass_np_extractor_to_constructor(self): method test_getitem (line 505) | def test_getitem(self): method test_upper (line 510) | def test_upper(self): method test_upper_and_words (line 515) | def test_upper_and_words(self): method test_lower (line 519) | def test_lower(self): method test_find (line 524) | def test_find(self): method test_rfind (line 529) | def test_rfind(self): method test_startswith (line 534) | def test_startswith(self): method test_endswith (line 539) | def test_endswith(self): method test_split (line 544) | def test_split(self): method test_title (line 548) | def test_title(self): method test_format (line 552) | def test_format(self): method test_using_indices_for_slicing (line 557) | def test_using_indices_for_slicing(self): method test_indices_with_only_one_sentences (line 563) | def test_indices_with_only_one_sentences(self): method test_indices_with_multiple_puncutations (line 568) | def test_indices_with_multiple_puncutations(self): method test_indices_short_names (line 574) | def test_indices_short_names(self): method test_replace (line 580) | def test_replace(self): method test_join (line 585) | def test_join(self): method test_blob_noun_phrases (line 592) | def test_blob_noun_phrases(self): method test_word_counts (line 597) | def test_word_counts(self): method test_np_counts (line 615) | def test_np_counts(self): method test_add (line 624) | def test_add(self): method test_unicode (line 640) | def test_unicode(self): method test_strip (line 644) | def test_strip(self): method test_strip_and_words (line 650) | def test_strip_and_words(self): method test_index (line 654) | def test_index(self): method test_sentences_after_concatenation (line 658) | def test_sentences_after_concatenation(self): method test_sentiment (line 665) | def test_sentiment(self): method test_subjectivity (line 675) | def test_subjectivity(self): method test_polarity (line 680) | def test_polarity(self): method test_sentiment_of_emoticons (line 685) | def test_sentiment_of_emoticons(self): method test_bad_init (line 690) | def test_bad_init(self): method test_in (line 698) | def test_in(self): method test_json (line 704) | def test_json(self): method test_words_are_word_objects (line 719) | def test_words_are_word_objects(self): method test_words_have_pos_tags (line 723) | def test_words_have_pos_tags(self): method test_tokenizer_defaults_to_word_tokenizer (line 731) | def test_tokenizer_defaults_to_word_tokenizer(self): method test_tokens_property (line 734) | def test_tokens_property(self): method test_can_use_an_different_tokenizer (line 737) | def test_can_use_an_different_tokenizer(self): method test_tokenize_method (line 742) | def test_tokenize_method(self): method test_tags_uses_custom_tokenizer (line 750) | def test_tags_uses_custom_tokenizer(self): method test_tags_with_custom_tokenizer_and_tagger (line 764) | def test_tags_with_custom_tokenizer_and_tagger(self): method test_correct (line 783) | def test_correct(self): method test_parse (line 813) | def test_parse(self): method test_passing_bad_init_params (line 817) | def test_passing_bad_init_params(self): method test_classify (line 830) | def test_classify(self): method test_classify_without_classifier (line 839) | def test_classify_without_classifier(self): method test_word_string_type_after_pos_tags_is_str (line 844) | def test_word_string_type_after_pos_tags_is_str(self): class WordTest (line 851) | class WordTest(TestCase): method setUp (line 852) | def setUp(self): method test_init (line 856) | def test_init(self): method test_singularize (line 862) | def test_singularize(self): method test_pluralize (line 868) | def test_pluralize(self): method test_repr (line 873) | def test_repr(self): method test_str (line 876) | def test_str(self): method test_has_str_methods (line 879) | def test_has_str_methods(self): method test_spellcheck (line 884) | def test_spellcheck(self): method test_spellcheck_special_cases (line 889) | def test_spellcheck_special_cases(self): method test_correct (line 900) | def test_correct(self): method test_lemmatize (line 907) | def test_lemmatize(self): method test_lemma (line 916) | def test_lemma(self): method test_stem (line 922) | def test_stem(self): # only PorterStemmer tested method test_synsets (line 930) | def test_synsets(self): method test_synsets_with_pos_argument (line 935) | def test_synsets_with_pos_argument(self): method test_definitions (line 941) | def test_definitions(self): method test_define (line 946) | def test_define(self): class TestWordnetInterface (line 953) | class TestWordnetInterface(TestCase): method setUp (line 954) | def setUp(self): method test_synset (line 957) | def test_synset(self): method test_lemma (line 962) | def test_lemma(self): class BlobberTest (line 968) | class BlobberTest(TestCase): method setUp (line 969) | def setUp(self): method test_creates_blobs (line 972) | def test_creates_blobs(self): method test_default_tagger (line 978) | def test_default_tagger(self): method test_default_np_extractor (line 982) | def test_default_np_extractor(self): method test_default_tokenizer (line 986) | def test_default_tokenizer(self): method test_str_and_repr (line 990) | def test_str_and_repr(self): method test_overrides (line 995) | def test_overrides(self): method test_override_analyzer (line 1006) | def test_override_analyzer(self): method test_overrider_classifier (line 1013) | def test_overrider_classifier(self): function is_blob (line 1019) | def is_blob(obj): FILE: tests/test_classifiers.py class BadNLTKClassifier (line 49) | class BadNLTKClassifier(NLTKClassifier): class TestNLTKClassifier (line 55) | class TestNLTKClassifier(unittest.TestCase): method setUp (line 56) | def setUp(self): method test_raises_value_error_without_nltk_class (line 59) | def test_raises_value_error_without_nltk_class(self): class TestNaiveBayesClassifier (line 70) | class TestNaiveBayesClassifier(unittest.TestCase): method setUp (line 71) | def setUp(self): method test_default_extractor (line 74) | def test_default_extractor(self): method test_classify (line 80) | def test_classify(self): method test_classify_a_list_of_words (line 85) | def test_classify_a_list_of_words(self): method test_train_from_lists_of_words (line 89) | def test_train_from_lists_of_words(self): method test_prob_classify (line 95) | def test_prob_classify(self): method test_accuracy (line 100) | def test_accuracy(self): method test_update (line 104) | def test_update(self): method test_labels (line 113) | def test_labels(self): method test_show_informative_features (line 118) | def test_show_informative_features(self): method test_informative_features (line 121) | def test_informative_features(self): method test_custom_feature_extractor (line 126) | def test_custom_feature_extractor(self): method test_init_with_csv_file (line 131) | def test_init_with_csv_file(self): method test_init_with_csv_file_without_format_specifier (line 138) | def test_init_with_csv_file_without_format_specifier(self): method test_init_with_json_file (line 145) | def test_init_with_json_file(self): method test_init_with_json_file_without_format_specifier (line 152) | def test_init_with_json_file_without_format_specifier(self): method test_init_with_custom_format (line 159) | def test_init_with_custom_format(self): method test_data_with_no_available_format (line 179) | def test_data_with_no_available_format(self): method test_accuracy_on_a_csv_file (line 186) | def test_accuracy_on_a_csv_file(self): method test_accuracy_on_json_file (line 191) | def test_accuracy_on_json_file(self): method test_init_with_tsv_file (line 196) | def test_init_with_tsv_file(self): method test_init_with_bad_format_specifier (line 203) | def test_init_with_bad_format_specifier(self): method test_repr (line 207) | def test_repr(self): class TestDecisionTreeClassifier (line 214) | class TestDecisionTreeClassifier(unittest.TestCase): method setUp (line 215) | def setUp(self): method test_classify (line 218) | def test_classify(self): method test_accuracy (line 223) | def test_accuracy(self): method test_update (line 227) | def test_update(self): method test_custom_feature_extractor (line 233) | def test_custom_feature_extractor(self): method test_pseudocode (line 238) | def test_pseudocode(self): method test_pretty_format (line 242) | def test_pretty_format(self): method test_repr (line 248) | def test_repr(self): class TestMaxEntClassifier (line 257) | class TestMaxEntClassifier(unittest.TestCase): method setUp (line 258) | def setUp(self): method test_classify (line 261) | def test_classify(self): method test_prob_classify (line 266) | def test_prob_classify(self): class TestPositiveNaiveBayesClassifier (line 272) | class TestPositiveNaiveBayesClassifier(unittest.TestCase): method setUp (line 273) | def setUp(self): method test_classifier (line 296) | def test_classifier(self): method test_classify (line 301) | def test_classify(self): method test_update (line 305) | def test_update(self): method test_accuracy (line 317) | def test_accuracy(self): method test_repr (line 328) | def test_repr(self): function test_basic_extractor (line 335) | def test_basic_extractor(): function test_basic_extractor_with_list (line 343) | def test_basic_extractor_with_list(): function test_contains_extractor_with_string (line 351) | def test_contains_extractor_with_string(): function test_contains_extractor_with_list (line 360) | def test_contains_extractor_with_list(): function custom_extractor (line 369) | def custom_extractor(document): function test_get_words_from_dataset (line 378) | def test_get_words_from_dataset(): FILE: tests/test_decorators.py class Tokenizer (line 9) | class Tokenizer: method tag (line 11) | def tag(self, text): function test_decorator_raises_missing_corpus_exception (line 15) | def test_decorator_raises_missing_corpus_exception(): FILE: tests/test_formats.py class TestFormats (line 12) | class TestFormats(unittest.TestCase): method setUp (line 13) | def setUp(self): method test_detect_csv (line 16) | def test_detect_csv(self): method test_detect_json (line 21) | def test_detect_json(self): method test_available (line 26) | def test_available(self): class TestDelimitedFormat (line 33) | class TestDelimitedFormat(unittest.TestCase): method test_delimiter_defaults_to_comma (line 34) | def test_delimiter_defaults_to_comma(self): method test_detect (line 37) | def test_detect(self): class TestCSV (line 46) | class TestCSV(unittest.TestCase): method test_read_from_filename (line 47) | def test_read_from_filename(self): method test_detect (line 51) | def test_detect(self): class TestTSV (line 60) | class TestTSV(unittest.TestCase): method test_read_from_file_object (line 61) | def test_read_from_file_object(self): method test_detect (line 65) | def test_detect(self): class TestJSON (line 75) | class TestJSON(unittest.TestCase): method test_read_from_file_object (line 76) | def test_read_from_file_object(self): method test_detect (line 80) | def test_detect(self): method test_to_iterable (line 88) | def test_to_iterable(self): class CustomFormat (line 97) | class CustomFormat(formats.BaseFormat): method to_iterable (line 98) | def to_iterable(): method detect (line 102) | def detect(cls, stream): class TestRegistry (line 106) | class TestRegistry(unittest.TestCase): method setUp (line 107) | def setUp(self): method test_register (line 110) | def test_register(self): FILE: tests/test_inflect.py class InflectTestCase (line 12) | class InflectTestCase(TestCase): method s_singular_pluralize_test (line 13) | def s_singular_pluralize_test(self): method s_singular_singularize_test (line 16) | def s_singular_singularize_test(self): method diagnoses_singularize_test (line 19) | def diagnoses_singularize_test(self): method bus_pluralize_test (line 22) | def bus_pluralize_test(self): method test_all_singular_s (line 25) | def test_all_singular_s(self): method test_all_singular_ie (line 29) | def test_all_singular_ie(self): method test_all_singular_irregular (line 34) | def test_all_singular_irregular(self): FILE: tests/test_np_extractor.py class TestConllExtractor (line 11) | class TestConllExtractor(unittest.TestCase): method setUp (line 12) | def setUp(self): method test_extract (line 26) | def test_extract(self): method test_parse_sentence (line 33) | def test_parse_sentence(self): method test_filter_insignificant (line 38) | def test_filter_insignificant(self): class BadExtractor (line 47) | class BadExtractor(BaseNPExtractor): function test_cannot_instantiate_incomplete_extractor (line 53) | def test_cannot_instantiate_incomplete_extractor(): FILE: tests/test_parsers.py class TestPatternParser (line 7) | class TestPatternParser(unittest.TestCase): method setUp (line 8) | def setUp(self): method test_parse (line 12) | def test_parse(self): FILE: tests/test_sentiments.py class TestPatternSentiment (line 13) | class TestPatternSentiment(unittest.TestCase): method setUp (line 14) | def setUp(self): method test_kind (line 17) | def test_kind(self): method test_analyze (line 20) | def test_analyze(self): method test_analyze_assessments (line 30) | def test_analyze_assessments(self): class TestNaiveBayesAnalyzer (line 43) | class TestNaiveBayesAnalyzer(unittest.TestCase): method setUp (line 44) | def setUp(self): method test_kind (line 47) | def test_kind(self): method test_analyze (line 51) | def test_analyze(self): function assert_about_equal (line 67) | def assert_about_equal(first, second, places=4): FILE: tests/test_taggers.py class TestPatternTagger (line 13) | class TestPatternTagger(unittest.TestCase): method setUp (line 14) | def setUp(self): method test_init (line 18) | def test_init(self): method test_tag (line 22) | def test_tag(self): class TestNLTKTagger (line 42) | class TestNLTKTagger(unittest.TestCase): method setUp (line 43) | def setUp(self): method test_tag (line 47) | def test_tag(self): function test_cannot_instantiate_incomplete_tagger (line 65) | def test_cannot_instantiate_incomplete_tagger(): FILE: tests/test_tokenizers.py function is_generator (line 13) | def is_generator(obj): class TestWordTokenizer (line 17) | class TestWordTokenizer(unittest.TestCase): method setUp (line 18) | def setUp(self): method tearDown (line 22) | def tearDown(self): method test_tokenize (line 25) | def test_tokenize(self): method test_exclude_punc (line 36) | def test_exclude_punc(self): method test_itokenize (line 46) | def test_itokenize(self): method test_word_tokenize (line 51) | def test_word_tokenize(self): class TestSentenceTokenizer (line 57) | class TestSentenceTokenizer(unittest.TestCase): method setUp (line 58) | def setUp(self): method test_tokenize (line 62) | def test_tokenize(self): method test_tokenize_with_multiple_punctuation (line 69) | def test_tokenize_with_multiple_punctuation(self): method test_itokenize (line 81) | def test_itokenize(self): method test_sent_tokenize (line 86) | def test_sent_tokenize(self): FILE: tests/test_utils.py class UtilsTests (line 10) | class UtilsTests(TestCase): method setUp (line 11) | def setUp(self): method test_strip_punc (line 14) | def test_strip_punc(self): method test_strip_punc_all (line 17) | def test_strip_punc_all(self): method test_lowerstrip (line 20) | def test_lowerstrip(self): function test_is_filelike (line 24) | def test_is_filelike():