MCPcopy Create free account

hub / github.com/cbaziotis/ekphrasis / functions

Functions82 in github.com/cbaziotis/ekphrasis

↓ 14 callersMethodwrap_non_matching
(exp)
ekphrasis/classes/tokenizer.py:228
↓ 9 callersMethodknown
The subset of `words` that appear in the dictionary of WORDS.
ekphrasis/classes/spellcorrect.py:63
↓ 8 callersMethodsegment
(self, word)
ekphrasis/classes/segmenter.py:133
↓ 6 callersMethodedit_step
All edits that are one edit away from `word`.
ekphrasis/classes/spellcorrect.py:44
↓ 5 callersMethodadd_special_tag
(m, tag, mode="single")
ekphrasis/classes/preprocessor.py:112
↓ 3 callersMethodcase_of
Return the case-function appropriate for text: upper, lower, title, or just str.
ekphrasis/classes/spellcorrect.py:126
↓ 3 callersFunctionget_stats_dir
()
ekphrasis/utils/helpers.py:12
↓ 3 callersFunctionprune_low_freq
remove ngrams with count less than mincount avoid dict comprehension as it creates a new temp dict and overloads the memory Args:
ekphrasis/tools/generate_stats.py:150
↓ 3 callersFunctionread_stats
(corpus, ngram)
ekphrasis/utils/helpers.py:45
↓ 3 callersMethodwrite
(self)
ekphrasis/dicts/sentiment/nrc_emolex/NRCEmolex.py:19
↓ 3 callersFunctionwrite_stats
(counts)
ekphrasis/tools/generate_stats.py:131
↓ 2 callersMethodcorrect
Most probable spelling correction for word.
ekphrasis/classes/spellcorrect.py:98
↓ 2 callersFunctioncount_file
Count the word statistics of a file :param desc: :param filename: :param countkeeper: :return:
ekphrasis/tools/generate_stats.py:106
↓ 2 callersMethodedits2
All edits that are two edits away from `word`.
ekphrasis/classes/spellcorrect.py:56
↓ 2 callersMethodget_compiled
(self)
ekphrasis/classes/exmanager.py:13
↓ 2 callersMethodhandle_generic_match
Args: m (): tag (): mode (): Returns:
ekphrasis/classes/preprocessor.py:200
↓ 2 callersMethodpre_process_doc
(self, doc)
ekphrasis/classes/preprocessor.py:249
↓ 1 callersMethodadd_to_pipeline
(self, term)
ekphrasis/classes/tokenizer.py:51
↓ 1 callersMethodbest_elong_candidate
(self, word)
ekphrasis/classes/spellcorrect.py:148
↓ 1 callersMethodbuild
(self, pipeline)
ekphrasis/classes/tokenizer.py:55
↓ 1 callersFunctioncheck_stats_files
()
ekphrasis/utils/helpers.py:88
↓ 1 callersMethodcombine
Combine first and rem results into one (probability, words) pair :param first: a tuple in the form: probability, word :param
ekphrasis/classes/segmenter.py:96
↓ 1 callersMethodcondProbWord
Conditional probability of word, given previous word if bigram is not in our list, then fall back to unigrams Args:
ekphrasis/classes/segmenter.py:69
↓ 1 callersMethodcorrect_word
Spell-correct word in match, and preserve proper upper/lower/title case.
ekphrasis/classes/spellcorrect.py:118
↓ 1 callersMethoddict_replace
(wordlist, _dict)
ekphrasis/classes/preprocessor.py:229
↓ 1 callersFunctiondownload_statistics
()
ekphrasis/utils/helpers.py:72
↓ 1 callersMethodedit_candidates
Generate possible spelling corrections for word.
ekphrasis/classes/spellcorrect.py:73
↓ 1 callersMethodelong_normalized_candidates
(self, word, acc=None)
ekphrasis/classes/spellcorrect.py:136
↓ 1 callersFunctionfind_negations
Takes as input a list of words and returns the positions (indices) of the words that are in the context of a negation. :param list doc:
ekphrasis/utils/nlp.py:71
↓ 1 callersMethodfind_segment
Return (log P(words), words), where words is the best estimated segmentation :param text: the text to be segmented :param pre
ekphrasis/classes/segmenter.py:118
↓ 1 callersFunctionget_ngrams
(input_list, n)
ekphrasis/tools/generate_stats.py:81
↓ 1 callersMethodhandle_elongated_match
(self, m)
ekphrasis/classes/preprocessor.py:158
↓ 1 callersMethodhandle_emphasis_match
:param m: :return:
ekphrasis/classes/preprocessor.py:217
↓ 1 callersMethodhandle_hashtag_match
Break a string to its constituent words (using Viterbi algorithm)
ekphrasis/classes/preprocessor.py:130
↓ 1 callersMethodhandle_repeated_puncts
return the sorted set so mathes random combinations of puncts will be mapped to the same token "!??!?!!", "?!!!!?!", "!!?", "
ekphrasis/classes/preprocessor.py:182
↓ 1 callersFunctionlistdir_nohidden
(path)
ekphrasis/utils/helpers.py:68
↓ 1 callersMethodmost_probable
(self, words)
ekphrasis/classes/spellcorrect.py:36
↓ 1 callersMethodnormalize_elongated
(self, word)
ekphrasis/classes/spellcorrect.py:153
↓ 1 callersFunctionparse_stats
Read key,value pairs from file.
ekphrasis/utils/helpers.py:28
↓ 1 callersFunctionpolarity
Estimate the sentiment polarity of a tokenized document. Args: doc (): a list of words (strings) neg_comma (): if True, the n
ekphrasis/utils/nlp.py:175
↓ 1 callersMethodpre_process_docs
(self, docs, lazy=True)
ekphrasis/classes/preprocessor.py:347
↓ 1 callersMethodremove_hashtag_allcaps
(wordlist)
ekphrasis/classes/preprocessor.py:233
↓ 1 callersFunctionremove_tags
Remove tags from sentence
ekphrasis/utils/helpers.py:100
↓ 1 callersMethodsplits
Return a list of all possible (first, rem) pairs with max length of first <=L :param text: :return:
ekphrasis/classes/segmenter.py:107
↓ 1 callersFunctiontokenize
extract words from text :param text: :return:
ekphrasis/tools/generate_stats.py:69
↓ 1 callersFunctionunpack_contractions
Replace *English* contractions in ``text`` str with their unshortened forms. N.B. The "'d" and "'s" forms are ambiguous (had/would, is/has/po
ekphrasis/utils/nlp.py:24
↓ 1 callersMethodverbose_text
(self, text, tokenized)
ekphrasis/classes/tokenizer.py:64
↓ 1 callersMethodverbose_text
(self, text, tokenized)
ekphrasis/classes/tokenizer.py:231
↓ 1 callersMethodwrap_non_matching
(exp)
ekphrasis/classes/tokenizer.py:61
↓ 1 callersFunctionwrite_stats_to_file
(file, counts, mincount)
ekphrasis/tools/generate_stats.py:85
MethodP
Probability of `word`.
ekphrasis/classes/spellcorrect.py:30
Method__call__
(self, key)
ekphrasis/classes/segmenter.py:40
Method__copy__
(self)
ekphrasis/classes/preprocessor.py:105
Method__deepcopy__
(self, memo)
ekphrasis/classes/preprocessor.py:108
Method__init__
(self)
ekphrasis/dicts/sentiment/nrc_emolex/NRCEmolex.py:14
Method__init__
Kwargs: omit (list): choose what tokens that you want to omit from the text. possible values: ['email', 'percent'
ekphrasis/classes/preprocessor.py:14
Method__init__
:param corpus: the statistics from which corpus to use for the spell correction.
ekphrasis/classes/spellcorrect.py:17
Method__init__
Args: pipeline (list): list of terms to use for tokenization. Each term, is a key from the dict of regexes `expre
ekphrasis/classes/tokenizer.py:19
Method__init__
Args: lowercase (bool): set to True in order to lowercase the text verbose (bool): set to True to print each text af
ekphrasis/classes/tokenizer.py:95
Method__init__
(self, data=None, total=None, unk_func=None, **kwargs)
ekphrasis/classes/segmenter.py:29
Method__init__
Args: corpus (str): the statistics from which corpus to use for the spell correction. max_split_lengt
ekphrasis/classes/segmenter.py:48
Functioncheck_empty_arg
(value)
ekphrasis/tools/generate_stats.py:25
Methodcorrect_match
Spell-correct word in match, and preserve proper upper/lower/title case.
ekphrasis/classes/spellcorrect.py:110
Methodcorrect_text
Correct all the words within a text, returning the corrected text.
ekphrasis/classes/spellcorrect.py:104
Methoddefault_unk_func
(key, total)
ekphrasis/classes/segmenter.py:26
Methoddemo
(self)
ekphrasis/classes/segmenter.py:139
Functiondoc_ngrams
(doc, n_from=1, n_to=2)
ekphrasis/utils/nlp.py:65
Functionmark_doc
Given a list of words and a set of word positions, mark the words in those positions. :param list doc: a list of words (strings) :param s
ekphrasis/utils/nlp.py:144
Functionparse_int_list
(value)
ekphrasis/tools/generate_stats.py:31
Functionplot_statistics
(statistics)
ekphrasis/tools/generate_stats.py:168
Methodprint_expressions
(self)
ekphrasis/classes/exmanager.py:18
Functionprint_positive
(sentiment)
ekphrasis/dicts/emoticons.py:210
Functionproduct
Return the product of a sequence of numbers.
ekphrasis/utils/helpers.py:94
Methodread
(self)
ekphrasis/dicts/sentiment/nrc_emolex/NRCEmolex.py:51
Functionread_slangdict
()
ekphrasis/dicts/noslang/manager.py:6
Methodsimilar
(a, b)
ekphrasis/classes/spellcorrect.py:70
Methodtokenize
(self, text)
ekphrasis/classes/tokenizer.py:74
Methodtokenize
(self, text)
ekphrasis/classes/tokenizer.py:241
Methodtokens
(text)
ekphrasis/classes/spellcorrect.py:27
Methodunk_probability
Estimate the probability of an unknown word, penalizing its length :param key: the word :param total: the count of all tokens
ekphrasis/classes/segmenter.py:86
Functionws_tokenizer
(text)
ekphrasis/examples/example.py:6
Functionwsp_tokenizer
(text)
ekphrasis/examples/demo_tok.py:9