Repository Analysis

nltk/nltk

NLTK Source

19.0 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of nltk/nltk, a Python project with 14,669 GitHub stars. SynthScan v2.0 examined 158,720 lines of code across 472 source files, recording 2287 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 19.0 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

19.0
Adjusted Score
19.0
Raw Score
100%
Time Factor
2026-07-08
Last Push
14.7K
Stars
Python
Language
158.7K
Lines of Code
472
Files
2.3K
Pattern Hits
2026-07-14
Scan Date
0.19
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 90MEDIUM 196LOW 2001

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2287 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers695 hits · 759 pts
SeverityFileLineSnippetContext
LOWnltk/tgrep.py298def _tgrep_node_literal_value(node):CODE
LOWnltk/tgrep.py382def _tgrep_nltk_tree_pos_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py629def _tgrep_conjunction_action(_s, _l, tokens, join_char="&"):CODE
LOWnltk/tgrep.py664def _tgrep_segmented_pattern_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py706def _tgrep_node_label_use_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py725def _tgrep_node_label_pred_use_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py754def _tgrep_bind_node_label_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py793def _tgrep_rel_disjunction_action(_s, _l, tokens):CODE
LOWnltk/downloader.py1456 def _simple_interactive_download(self, args):CODE
LOWnltk/downloader.py1486 def _simple_interactive_update(self):CODE
LOWnltk/downloader.py1537 def _simple_interactive_config(self):CODE
LOWnltk/util.py385def unweighted_minimum_spanning_digraph(tree, children=iter, shapes=None, attr=None):CODE
LOWnltk/util.py544def acyclic_branches_depth_first(CODE
LOWnltk/util.py639def unweighted_minimum_spanning_dict(tree, children=iter):CODE
LOWnltk/util.py684def unweighted_minimum_spanning_tree(tree, children=iter):CODE
LOWnltk/pathsec.py366def _resolve_and_validate_host(host, port):CODE
LOWnltk/grammar.py725 def is_flexible_chomsky_normal_form(self):CODE
LOWnltk/grammar.py1512def _read_dependency_production(s):CODE
LOWnltk/featstruct.py1707def _apply_forwards_to_bindings(forward, bindings):CODE
LOWnltk/data.py61def _assert_no_encoded_bypass(name, error_label=None):CODE
LOWnltk/data.py94def _reject_unsafe_no_protocol(resource_url):CODE
LOWnltk/data.py537def _check_decompression_bomb(info):CODE
LOWnltk/tree/tree.py423 def treeposition_spanning_leaves(self, start, end):CODE
LOWnltk/metrics/paice.py26def get_words_from_dictionary(lemmas):CODE
LOWnltk/metrics/paice.py265 def _get_truncation_coordinates(self, cutlength=0):CODE
LOWnltk/metrics/agreement.py211 def _chance_corrected_agreement(self, observed, expected):CODE
LOWnltk/app/concordance_app.py321 def search_enter_keypress_handler(self, *event):CODE
LOWnltk/app/concordance_app.py428 def handle_error_loading_corpus(self, event):CODE
LOWnltk/app/chunkparser_app.py769 def _adaptively_modify_eval_chunk(self, t):CODE
LOWnltk/app/chunkparser_app.py1215 def _syntax_highlight_grammar(self, grammar):CODE
LOWnltk/app/rdparser_app.py986 def _animate_match_backtrack_frame(self, frame, widget, dy):CODE
LOWnltk/app/chartparser_app.py2517 def bottom_up_leftcorner_strategy(self, *e):CODE
LOWnltk/app/collocations_app.py259 def handle_error_loading_corpus(self, event):CODE
LOWnltk/app/wordnet_app.py205def get_unique_counter_from_url(sp):CODE
LOWnltk/app/wordnet_app.py903def get_static_welcome_message():STRING
LOWnltk/classify/util.py171def binary_names_demo_features(name):CODE
LOWnltk/classify/maxent.py1124def calculate_empirical_fcount(train_toks, encoding):CODE
LOWnltk/classify/maxent.py1134def calculate_estimated_fcount(classifier, train_toks, encoding):CODE
LOWnltk/classify/maxent.py206 def most_informative_features(self, n=10):CODE
LOWnltk/classify/maxent.py220 def show_most_informative_features(self, n=10, show="all"):CODE
LOWnltk/classify/maxent.py1028def train_maxent_classifier_with_gis(CODE
LOWnltk/classify/maxent.py1152def train_maxent_classifier_with_iis(CODE
LOWnltk/classify/maxent.py1405def train_maxent_classifier_with_megam(STRING
LOWnltk/classify/naivebayes.py124 def show_most_informative_features(self, n=10):CODE
LOWnltk/classify/naivebayes.py154 def most_informative_features(self, n=100):CODE
LOWnltk/test/test_filestring_sandbox.py21def test_rejects_parent_traversal(tmp_path):CODE
LOWnltk/test/test_filestring_sandbox.py36def test_rejects_symlink_escape(tmp_path):CODE
LOWnltk/test/test_filestring_sandbox.py56def test_preserves_file_like_objects():CODE
LOWnltk/test/unit/test_classify.py31def assert_classifier_correct(algorithm):CODE
LOWnltk/test/unit/test_cistem.py37def test_stem_and_segment_examples_preserved():CODE
LOWnltk/test/unit/test_cistem.py48def test_empty_and_short_words():CODE
LOWnltk/test/unit/test_cistem.py71def test_long_word_stems_in_linear_time():CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py15def test_java_call_options_do_not_mutate_global_java_options(monkeypatch):CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py51def test_stanford_tokenizer_cleans_temp_file_when_java_raises(monkeypatch):CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py80def test_stanford_tokenizer_raises_unlink_error_after_java_success(monkeypatch):CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py108def test_stanford_tokenizer_preserves_java_error_when_cleanup_also_fails(CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py138def test_stanford_parser_cleans_temp_file_when_java_raises(monkeypatch):CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py170def test_stanford_tagger_cleans_temp_file_when_java_raises(monkeypatch):CODE
LOWnltk/test/unit/test_stanford_java_wrappers.py199def test_stanford_segmenter_cleans_temp_file_when_execute_raises():CODE
LOWnltk/test/unit/test_zipbomb_security.py36def test_ratio_guard_blocks_bomb(tmp_path):CODE
635 more matches not shown…
Unused Imports640 hits · 569 pts
SeverityFileLineSnippetContext
LOWtools/find_deprecated.py30CODE
LOWnltk/downloader.py171CODE
LOWnltk/util.py30CODE
LOWnltk/util.py31CODE
LOWnltk/util.py31CODE
LOWnltk/__init__.py103CODE
LOWnltk/__init__.py133CODE
LOWnltk/__init__.py134CODE
LOWnltk/__init__.py134CODE
LOWnltk/__init__.py135CODE
LOWnltk/__init__.py136CODE
LOWnltk/__init__.py137CODE
LOWnltk/__init__.py138CODE
LOWnltk/__init__.py139CODE
LOWnltk/__init__.py140CODE
LOWnltk/__init__.py146CODE
LOWnltk/__init__.py147CODE
LOWnltk/__init__.py148CODE
LOWnltk/__init__.py149CODE
LOWnltk/__init__.py150CODE
LOWnltk/__init__.py151CODE
LOWnltk/__init__.py152CODE
LOWnltk/__init__.py153CODE
LOWnltk/__init__.py154CODE
LOWnltk/__init__.py155CODE
LOWnltk/__init__.py156CODE
LOWnltk/__init__.py179CODE
LOWnltk/__init__.py179CODE
LOWnltk/__init__.py199CODE
LOWnltk/__init__.py199CODE
LOWnltk/__init__.py199CODE
LOWnltk/__init__.py199CODE
LOWnltk/__init__.py200CODE
LOWnltk/__init__.py200CODE
LOWnltk/__init__.py200CODE
LOWnltk/__init__.py200CODE
LOWnltk/__init__.py200CODE
LOWnltk/__init__.py200CODE
LOWnltk/__init__.py201CODE
LOWnltk/__init__.py201CODE
LOWnltk/__init__.py201CODE
LOWnltk/__init__.py201CODE
LOWnltk/__init__.py201CODE
LOWnltk/__init__.py201CODE
LOWnltk/__init__.py202CODE
LOWnltk/__init__.py202CODE
LOWnltk/__init__.py202CODE
LOWnltk/__init__.py202CODE
LOWnltk/__init__.py202CODE
LOWnltk/__init__.py202CODE
LOWnltk/__init__.py107CODE
LOWnltk/__init__.py173CODE
LOWnltk/__init__.py177CODE
LOWnltk/__init__.py186CODE
LOWnltk/grammar.py1577CODE
LOWnltk/book.py9CODE
LOWnltk/book.py18CODE
LOWnltk/book.py20CODE
LOWnltk/collocations.py36CODE
LOWnltk/collocations.py36CODE
580 more matches not shown…
Deep Nesting374 hits · 348 pts
SeverityFileLineSnippetContext
LOWtools/find_deprecated.py116CODE
LOWtools/find_deprecated.py151CODE
LOWnltk/internals.py574CODE
LOWnltk/internals.py792CODE
LOWnltk/internals.py1197CODE
LOWnltk/tgrep.py322CODE
LOWnltk/tgrep.py398CODE
LOWnltk/downloader.py2614CODE
LOWnltk/downloader.py2876CODE
LOWnltk/downloader.py526CODE
LOWnltk/downloader.py680CODE
LOWnltk/downloader.py991CODE
LOWnltk/downloader.py1106CODE
LOWnltk/downloader.py1208CODE
LOWnltk/downloader.py1415CODE
LOWnltk/downloader.py1456CODE
LOWnltk/downloader.py1486CODE
LOWnltk/downloader.py1537CODE
LOWnltk/downloader.py1950CODE
LOWnltk/downloader.py2046CODE
LOWnltk/downloader.py2114CODE
LOWnltk/downloader.py2205CODE
LOWnltk/downloader.py2439CODE
LOWnltk/toolbox.py274CODE
LOWnltk/toolbox.py461CODE
LOWnltk/util.py221CODE
LOWnltk/util.py300CODE
LOWnltk/util.py342CODE
LOWnltk/util.py431CODE
LOWnltk/util.py471CODE
LOWnltk/util.py544CODE
LOWnltk/util.py639CODE
LOWnltk/util.py1172CODE
LOWnltk/pathsec.py72CODE
LOWnltk/pathsec.py182CODE
LOWnltk/pathsec.py301CODE
LOWnltk/pathsec.py468CODE
LOWnltk/grammar.py1362CODE
LOWnltk/grammar.py1427CODE
LOWnltk/grammar.py563CODE
LOWnltk/grammar.py842CODE
LOWnltk/cli.py42CODE
LOWnltk/collections.py63CODE
LOWnltk/collections.py396CODE
LOWnltk/probability.py693CODE
LOWnltk/featstruct.py1169CODE
LOWnltk/featstruct.py1254CODE
LOWnltk/featstruct.py1586CODE
LOWnltk/featstruct.py2614CODE
LOWnltk/featstruct.py154CODE
LOWnltk/featstruct.py642CODE
LOWnltk/featstruct.py680CODE
LOWnltk/featstruct.py698CODE
LOWnltk/featstruct.py777CODE
LOWnltk/featstruct.py821CODE
LOWnltk/featstruct.py957CODE
LOWnltk/featstruct.py973CODE
LOWnltk/featstruct.py991CODE
LOWnltk/featstruct.py1049CODE
LOWnltk/featstruct.py2326CODE
314 more matches not shown…
Cross-File Repetition62 hits · 310 pts
SeverityFileLineSnippetContext
HIGHnltk/grammar.py0s -> np vp [1.0] np -> det n [0.5] | np pp [0.25] | 'john' [0.1] | 'i' [0.15] det -> 'the' [0.8] | 'my' [0.2] n -> 'man'STRING
HIGHnltk/parse/pchart.py0s -> np vp [1.0] np -> det n [0.5] | np pp [0.25] | 'john' [0.1] | 'i' [0.15] det -> 'the' [0.8] | 'my' [0.2] n -> 'man'STRING
HIGHnltk/parse/viterbi.py0s -> np vp [1.0] np -> det n [0.5] | np pp [0.25] | 'john' [0.1] | 'i' [0.15] det -> 'the' [0.8] | 'my' [0.2] n -> 'man'STRING
HIGHnltk/grammar.py0s -> np vp [1.0] vp -> v np [.59] vp -> v [.40] vp -> vp pp [.01] np -> det n [.41] np -> name [.28] np -> np pp [.31] pSTRING
HIGHnltk/parse/pchart.py0s -> np vp [1.0] vp -> v np [.59] vp -> v [.40] vp -> vp pp [.01] np -> det n [.41] np -> name [.28] np -> np pp [.31] pSTRING
HIGHnltk/parse/viterbi.py0s -> np vp [1.0] vp -> v np [.59] vp -> v [.40] vp -> vp pp [.01] np -> det n [.41] np -> name [.28] np -> np pp [.31] pSTRING
HIGHnltk/app/chunkparser_app.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/app/rdparser_app.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/app/srparser_app.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/app/chartparser_app.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/sem/drt_glue_demo.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/draw/tree.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/draw/util.py0enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. STRING
HIGHnltk/test/unit/test_reviews_security.py0run ``target(result_q, *args)`` in a spawned process with a deadline. returns ``(finished, status, payload)``. if the woSTRING
HIGHnltk/test/unit/test_chunk_redos_security.py0run ``target(result_q, *args)`` in a spawned process with a deadline. returns ``(finished, status, payload)``. if the woSTRING
HIGHnltk/test/unit/test_texttiling_security.py0run ``target(result_q, *args)`` in a spawned process with a deadline. returns ``(finished, status, payload)``. if the woSTRING
HIGHnltk/test/unit/test_inference_security.py0run ``target(result_q, *args)`` in a spawned process with a deadline. returns ``(finished, status, payload)``. if the woSTRING
HIGHnltk/translate/ibm2.py0probability of target sentence and an alignment given the source sentenceSTRING
HIGHnltk/translate/ibm3.py0probability of target sentence and an alignment given the source sentenceSTRING
HIGHnltk/translate/ibm4.py0probability of target sentence and an alignment given the source sentenceSTRING
HIGHnltk/translate/ibm5.py0probability of target sentence and an alignment given the source sentenceSTRING
HIGHnltk/translate/ibm1.py0probability of target sentence and an alignment given the source sentenceSTRING
HIGHnltk/translate/ibm2.py0data object to store counts of various parameters during training. includes counts for vacancies.STRING
HIGHnltk/translate/ibm3.py0data object to store counts of various parameters during training. includes counts for vacancies.STRING
HIGHnltk/translate/ibm4.py0data object to store counts of various parameters during training. includes counts for vacancies.STRING
HIGHnltk/translate/ibm5.py0data object to store counts of various parameters during training. includes counts for vacancies.STRING
HIGHnltk/sem/glue.py0pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of chaSTRING
HIGHnltk/sem/lfg.py0pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of chaSTRING
HIGHnltk/inference/mace.py0pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of chaSTRING
HIGHnltk/corpus/reader/reviews.py0:param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. :STRING
HIGHnltk/corpus/reader/categorized_sents.py0:param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. :STRING
HIGHnltk/corpus/reader/comparative_sents.py0:param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. :STRING
HIGHnltk/corpus/reader/pros_cons.py0:param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. :STRING
HIGHnltk/corpus/reader/reviews.py0return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or rSTRING
HIGHnltk/corpus/reader/categorized_sents.py0return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or rSTRING
HIGHnltk/corpus/reader/comparative_sents.py0return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or rSTRING
HIGHnltk/corpus/reader/pros_cons.py0return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or rSTRING
HIGHnltk/corpus/reader/aligned.py0:return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str)STRING
HIGHnltk/corpus/reader/plaintext.py0:return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str)STRING
HIGHnltk/corpus/reader/chunked.py0:return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str)STRING
HIGHnltk/corpus/reader/tagged.py0:return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str)STRING
HIGHnltk/corpus/reader/semcor.py0:return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str)STRING
HIGHnltk/corpus/reader/aligned.py0:return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(liSTRING
HIGHnltk/corpus/reader/plaintext.py0:return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(liSTRING
HIGHnltk/corpus/reader/chunked.py0:return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(liSTRING
HIGHnltk/corpus/reader/tagged.py0:return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(liSTRING
HIGHnltk/corpus/reader/plaintext.py0:return: the given file(s) as a list of chapters, each encoded as a list of sentences, which are in turn encoded as listSTRING
HIGHnltk/corpus/reader/chunked.py0:return: the given file(s) as a list of chapters, each encoded as a list of sentences, which are in turn encoded as listSTRING
HIGHnltk/corpus/reader/tagged.py0:return: the given file(s) as a list of chapters, each encoded as a list of sentences, which are in turn encoded as listSTRING
HIGHnltk/corpus/reader/plaintext.py0initialize the corpus reader. categorization arguments (``cat_pattern``, ``cat_map``, and ``cat_file``) are passed to thSTRING
HIGHnltk/corpus/reader/markdown.py0initialize the corpus reader. categorization arguments (``cat_pattern``, ``cat_map``, and ``cat_file``) are passed to thSTRING
HIGHnltk/corpus/reader/tagged.py0initialize the corpus reader. categorization arguments (``cat_pattern``, ``cat_map``, and ``cat_file``) are passed to thSTRING
HIGHnltk/parse/recursivedescent.py0create a new ``viterbiparser`` parser, that uses ``grammar`` to parse texts. :type grammar: pcfg :param grammar: the graSTRING
HIGHnltk/parse/shiftreduce.py0create a new ``viterbiparser`` parser, that uses ``grammar`` to parse texts. :type grammar: pcfg :param grammar: the graSTRING
HIGHnltk/parse/viterbi.py0create a new ``viterbiparser`` parser, that uses ``grammar`` to parse texts. :type grammar: pcfg :param grammar: the graSTRING
HIGHnltk/parse/recursivedescent.py0set the level of tracing output that should be generated when parsing a text. :type trace: int :param trace: the trace lSTRING
HIGHnltk/parse/pchart.py0set the level of tracing output that should be generated when parsing a text. :type trace: int :param trace: the trace lSTRING
HIGHnltk/parse/shiftreduce.py0set the level of tracing output that should be generated when parsing a text. :type trace: int :param trace: the trace lSTRING
HIGHnltk/parse/viterbi.py0set the level of tracing output that should be generated when parsing a text. :type trace: int :param trace: the trace lSTRING
HIGHnltk/inference/tableau.py0:param goal: input expression to prove :type goal: sem.expression :param assumptions: input expressions to use as assumpSTRING
2 more matches not shown…
Decorative Section Separators81 hits · 290 pts
SeverityFileLineSnippetContext
MEDIUMnltk/langnames.py131# =======================================================================COMMENT
MEDIUMnltk/langnames.py257# ======================================================================COMMENT
MEDIUMnltk/downloader.py70# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/downloader.py935 # ---------------------------------------------------COMMENT
MEDIUMnltk/downloader.py2678 # -----------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py98# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py100# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/data.py282 # ----------------------------------------------------------------------STRING
MEDIUMnltk/data.py284 # ----------------------------------------------------------------------STRING
MEDIUMnltk/chunk/named_entity.py317# ======================================================================================COMMENT
MEDIUMnltk/chunk/named_entity.py359# ======================================================================================COMMENT
MEDIUMnltk/test/unit/test_aline.py87# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_aline.py89# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py168 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py170 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py203 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py205 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py144 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py146 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py187 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py189 # ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py426# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_distance.py428# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec.py594# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec.py596# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec.py534# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec.py536# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec.py568# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec.py570# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py35# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py37# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py71# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py73# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py82# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py84# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py108# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_conll_cmudict_security.py110# --------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_util.py16# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_util.py18# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_util.py79# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_util.py81# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py14# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py16# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py43# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py45# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py86# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py89# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py203# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py205# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py217# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py219# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py310# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_verbnet.py312# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_data_security.py245# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_data_security.py247# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/translate/test_meteor.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/translate/test_meteor.py27# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/sem/drt.py1061 # ==========================================================COMMENT
21 more matches not shown…
Self-Referential Comments74 hits · 186 pts
SeverityFileLineSnippetContext
MEDIUMtools/find_deprecated.py55# Define a regexp to search for deprecated definitions.COMMENT
MEDIUMnltk/downloader.py1021 # Define a helper function for displaying output:COMMENT
MEDIUMnltk/downloader.py1683 # Create the main window.COMMENT
MEDIUMnltk/downloader.py1730 # Create the top-level frame structuresCOMMENT
MEDIUMnltk/downloader.py1753 # Create the tabsCOMMENT
MEDIUMnltk/downloader.py1762 # Create the table.COMMENT
MEDIUMnltk/downloader.py1868 # Create a menu to control which columns of the table areCOMMENT
MEDIUMnltk/downloader.py1883 # Create a sort menuCOMMENT
MEDIUMnltk/downloader.py2383 # Create a new data server object for the download operation,COMMENT
MEDIUMnltk/toolbox.py325 """This class is the base class for settings files."""STRING
MEDIUMnltk/lazyimport.py1# This module is from mx/DateTime/LazyModule.py and isCOMMENT
MEDIUMnltk/text.py216 # Create the pretty lines with the query_word in the middle.COMMENT
MEDIUMnltk/text.py223 # Create the ConcordanceLineCOMMENT
MEDIUMnltk/text.py619 # Create the model when using it the first time.COMMENT
MEDIUMnltk/probability.py1176 # Create a heldout probability distribution for each pair ofCOMMENT
MEDIUMnltk/probability.py1325# This method is problematic because the situation ``N(c+1) == 0``COMMENT
MEDIUMnltk/featstruct.py2251 # Create the new feature structureCOMMENT
MEDIUMnltk/tree/transforms.py128 # This method is 7x faster which helps when parsing 40,000 sentences.STRING
MEDIUMnltk/app/rdparser_app.py113 # Create the basic frames.COMMENT
MEDIUMnltk/app/srparser_app.py122 # Create the basic frames.COMMENT
MEDIUMnltk/app/chartparser_app.py449 # Create a widget for it.COMMENT
MEDIUMnltk/app/chartparser_app.py1054 # Create the chart canvas.COMMENT
MEDIUMnltk/app/chartparser_app.py1059 # Create the sentence canvas.COMMENT
MEDIUMnltk/app/chartparser_app.py1070 # Create the tree canvas.COMMENT
MEDIUMnltk/app/chartparser_app.py1789 # Create the root window.COMMENT
MEDIUMnltk/classify/util.py243 # Create a list of male names to be used as positive-labeled examples for trainingCOMMENT
MEDIUMnltk/classify/util.py246 # Create a list of male and female names to be used as unlabeled examplesCOMMENT
MEDIUMnltk/classify/util.py249 # Create a test set with correctly-labeled male and female namesCOMMENT
MEDIUMnltk/classify/__init__.py49 >>> # Define a feature detector function.STRING
MEDIUMnltk/classify/positivenaivebayes.py142 # Create the P(label) distribution.COMMENT
MEDIUMnltk/classify/positivenaivebayes.py147 # Create the P(fval|label, fname) distribution.COMMENT
MEDIUMnltk/classify/naivebayes.py235 # Create the P(label) distributionCOMMENT
MEDIUMnltk/classify/naivebayes.py238 # Create the P(fval|label, fname) distributionCOMMENT
MEDIUMnltk/test/unit/test_corpus_reader.py24 # Create a symlink inside corpus_root that points outside corpus_rootCOMMENT
MEDIUMnltk/sem/drt.py84 """This method is intended to be overridden for logics thatSTRING
MEDIUMnltk/sem/util.py140 # Initialize a variable assignment with parameter ``dom``COMMENT
MEDIUMnltk/sem/logic.py1944 """This class represents implications"""STRING
MEDIUMnltk/sem/logic.py1951 """This class represents biconditionals"""STRING
MEDIUMnltk/sem/logic.py1958 """This class represents equality expressions like "(x = y)"."""STRING
MEDIUMnltk/sem/logic.py323 """This method is intended to be overridden for logics thatSTRING
MEDIUMnltk/sem/logic.py1473 """This class represents a variable to be used as a predicate or entity"""STRING
MEDIUMnltk/sem/logic.py1545 """This class represents variables that take the form of a single lowercaseSTRING
MEDIUMnltk/sem/logic.py1575 """This class represents variables that take the form of a single uppercaseSTRING
MEDIUMnltk/sem/logic.py1590 """This class represents variables that take the form of a single lowercaseSTRING
MEDIUMnltk/sem/logic.py1597 """This class represents variables that do not take the form of a singleSTRING
MEDIUMnltk/sem/logic.py1918 """This class represents conjunctions"""STRING
MEDIUMnltk/sem/logic.py1931 """This class represents disjunctions"""STRING
MEDIUMnltk/sem/drt_glue_demo.py55 # Create the basic frames.COMMENT
MEDIUMnltk/corpus/europarl_raw.py13# Create a new corpus reader instance for each European languageCOMMENT
MEDIUMnltk/parse/pchart.py508 # Define a list of parsers. We'll use all parsers.COMMENT
MEDIUMnltk/parse/chart.py639 # Create the index.COMMENT
MEDIUMnltk/parse/nonprojectivedependencyparser.py506 # Create a new node v_n+1 with address = len(nodes) + 1COMMENT
MEDIUMnltk/parse/featurechart.py201 # Create the index.COMMENT
MEDIUMnltk/parse/featurechart.py285 # Create a copy of the bindings.STRING
MEDIUMnltk/parse/featurechart.py298 # Create a copy of the bindings.STRING
MEDIUMnltk/parse/earleychart.py103 # Create the index.COMMENT
MEDIUMnltk/parse/earleychart.py153 # Create the index.COMMENT
MEDIUMnltk/draw/cfg.py185 # Create the top-level window.STRING
MEDIUMnltk/draw/cfg.py248 # Create the basic Text widget & scrollbar.STRING
MEDIUMnltk/draw/cfg.py582 # Create the basic framesSTRING
14 more matches not shown…
Cross-Language Confusion28 hits · 160 pts
SeverityFileLineSnippetContext
HIGHnltk/featstruct.py537 Return True if ``self`` subsumes ``other``. I.e., return trueSTRING
HIGHnltk/featstruct.py1489 contain the unified value, the value of ``fstruct2`` is undefined,STRING
HIGHnltk/cluster/util.py157 queue.push((priority, node))CODE
HIGHnltk/app/chartparser_app.py1237 edgelen = max(edge.length(), 1)CODE
HIGHnltk/classify/maxent.py1125 fcount = numpy.zeros(encoding.length(), "d")CODE
HIGHnltk/classify/maxent.py1135 fcount = numpy.zeros(encoding.length(), "d")CODE
HIGHnltk/classify/maxent.py118 assert encoding.length() == len(weights)CODE
HIGHnltk/classify/maxent.py130 assert self._encoding.length() == len(new_weights)CODE
HIGHnltk/classify/maxent.py239 self._encoding.length(),CODE
HIGHnltk/classify/maxent.py1346 deltas = numpy.ones(encoding.length(), "d")STRING
HIGHnltk/classify/maxent.py1351 A = numpy.zeros((len(nfmap), encoding.length()), "d")STRING
HIGHnltk/classify/maxent.py1483 weights = parse_megam_weights(stdout, encoding.length(), explicit)STRING
HIGHnltk/classify/tadm.py115 for i in range(encoding.length()):CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py241 stack.push(_Hypothesis(0.2))CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py242 stack.push(poor_hypothesis)CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py243 stack.push(_Hypothesis(0.1))CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py244 stack.push(_Hypothesis(0.3))CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py256 stack.push(poor_hypothesis)CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py257 stack.push(worse_hypothesis)CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py258 stack.push(_Hypothesis(0.9)) # greatly superior hypothesisCODE
HIGHnltk/test/unit/translate/test_stack_decoder.py270 stack.push(_Hypothesis(0.9)) # greatly superior hypothesisCODE
HIGHnltk/test/unit/translate/test_stack_decoder.py271 stack.push(poor_hypothesis)CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py282 stack.push(_Hypothesis(0.0))CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py283 stack.push(best_hypothesis)CODE
HIGHnltk/test/unit/translate/test_stack_decoder.py284 stack.push(_Hypothesis(0.5))CODE
HIGHnltk/parse/pchart.py422 queue.sort(key=lambda edge: edge.length())CODE
HIGHnltk/parse/chart.py602 :param length: Only generate edges ``e`` where ``e.length()==length``STRING
HIGHnltk/parse/chart.py888 edges = sorted((e.length(), e.start(), e) for e in self)CODE
Excessive Try-Catch Wrapping109 hits · 133 pts
SeverityFileLineSnippetContext
LOWtools/global_replace.py38 except Exception:CODE
MEDIUMtools/global_replace.py19def update(file, pattern, replacement):CODE
LOWtools/huggingface/push_stopwords.py199 except Exception:CODE
MEDIUMnltk/downloader.py1449 print("Error reading from server: %s" % e)CODE
MEDIUMnltk/downloader.py1451 print("Error connecting to server: %s" % e.reason)CODE
MEDIUMnltk/downloader.py1565 print(f"Error reading <{new_url!r}>:\n {e}")CODE
MEDIUMnltk/downloader.py708def _within(child, root):CODE
LOWnltk/downloader.py1316 except Exception:CODE
LOWnltk/downloader.py1564 except Exception as e:CODE
LOWnltk/downloader.py2295 except Exception:CODE
LOWnltk/downloader.py2646 except Exception as e:CODE
LOWnltk/downloader.py2699 except Exception as e:CODE
LOWnltk/downloader.py2719 except Exception as e:CODE
LOWnltk/downloader.py2722 except Exception as e:CODE
LOWnltk/downloader.py2898 except Exception as e:CODE
LOWnltk/downloader.py2902 except Exception as e:CODE
LOWnltk/pathsec.py154 except Exception:CODE
LOWnltk/pathsec.py353 except Exception:CODE
LOWnltk/featstruct.py2711 except Exception:STRING
LOWnltk/data.py603 except Exception as e:CODE
LOWnltk/metrics/distance.py278 except Exception:CODE
MEDIUMnltk/twitter/twitterclient.py100 print(f"Error (stream will continue): {e}")CODE
MEDIUMnltk/twitter/twitterclient.py117 print(f"Error (stream will continue): {e}")CODE
LOWnltk/app/concordance_app.py403 except Exception:CODE
LOWnltk/app/concordance_app.py654 except Exception as e:CODE
MEDIUMnltk/app/concordance_app.py647def run(self):CODE
LOWnltk/app/chunkparser_app.py1463 except Exception:CODE
MEDIUMnltk/app/chunkparser_app.py1333def _chunkparse(self, words):CODE
LOWnltk/app/rdparser_app.py711 except Exception:CODE
LOWnltk/app/rdparser_app.py725 except Exception:CODE
LOWnltk/app/srparser_app.py656 except Exception:CODE
LOWnltk/app/srparser_app.py671 except Exception:CODE
MEDIUMnltk/app/chartparser_app.py1816 print("Error creating Tree View")CODE
LOWnltk/app/chartparser_app.py188 except Exception:CODE
LOWnltk/app/chartparser_app.py532 except Exception:CODE
LOWnltk/app/chartparser_app.py622 except Exception:CODE
LOWnltk/app/chartparser_app.py800 except Exception as e:CODE
LOWnltk/app/chartparser_app.py811 except Exception as e:CODE
LOWnltk/app/chartparser_app.py1815 except Exception:CODE
LOWnltk/app/chartparser_app.py2241 except Exception:CODE
LOWnltk/app/chartparser_app.py2283 except Exception as e:CODE
LOWnltk/app/chartparser_app.py2297 except Exception as e:CODE
LOWnltk/app/chartparser_app.py2316 except Exception as e:CODE
LOWnltk/app/chartparser_app.py2338 except Exception as e:CODE
LOWnltk/app/collocations_app.py421 except Exception as e:CODE
MEDIUMnltk/app/collocations_app.py406def run(self):CODE
LOWnltk/app/nemo_app.py95 except Exception:STRING
LOWnltk/app/nemo_app.py115 except Exception:STRING
LOWnltk/classify/weka.py78 except Exception:CODE
MEDIUMnltk/classify/weka.py73def _check_weka_version(jar):CODE
LOWnltk/test/unit/test_valuation_redos.py50 except Exception:CODE
MEDIUMnltk/test/unit/test_valuation_redos.py45def _parse_worker():CODE
LOWnltk/test/unit/test_ccg_lexicon_security.py39 except Exception:CODE
MEDIUMnltk/test/unit/test_ccg_lexicon_security.py26def _regex_worker(result_q):CODE
LOWnltk/test/unit/test_twitter_auth.py66 except Exception as e:CODE
LOWnltk/sem/boxer.py1009 except Exception as e:CODE
MEDIUMnltk/sem/boxer.py846def handle(self, tok, context):CODE
LOWnltk/sem/glue.py241 except Exception:CODE
LOWnltk/sem/glue.py651 except Exception as e:CODE
MEDIUMnltk/sem/glue.py655 print("Error when checking logical equality of statements", e)CODE
49 more matches not shown…
Over-Commented Block96 hits · 89 pts
SeverityFileLineSnippetContext
LOWtools/global_replace.py1#!/usr/bin/env pythonCOMMENT
LOWtools/github_actions/third-party.sh101COMMENT
LOWnltk/internals.py741 :param verbose: Whether or not to print path when a file is found.COMMENT
LOWnltk/downloader.py601COMMENT
LOWnltk/downloader.py681 yield StartPackageMessage(info)COMMENT
LOWnltk/downloader.py701 # contained, but open()/os.replace() follow the link and writeCOMMENT
LOWnltk/grammar.py1# Natural Language Toolkit: Context Free GrammarsCOMMENT
LOWnltk/probability.py1# Natural Language Toolkit: Probability and StatisticsCOMMENT
LOWnltk/probability.py1301##//////////////////////////////////////////////////////COMMENT
LOWnltk/probability.py1321# where *c* is the original count, *N(i)* is the number of event typesCOMMENT
LOWnltk/probability.py1341# appropriate for high values of r. For low values of r, they use theCOMMENT
LOWnltk/probability.py1661##//////////////////////////////////////////////////////COMMENT
LOWnltk/probability.py1681# titled "Improved backing-off for n-gram language modeling." In the same paperCOMMENT
LOWnltk/collocations.py381 )COMMENT
LOWnltk/featstruct.py2461 )COMMENT
LOWnltk/data.py281COMMENT
LOWnltk/decorators.py241## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOTCOMMENT
LOWnltk/misc/sort.py1# Natural Language Toolkit: List SortingCOMMENT
LOWnltk/tree/immutable.py1# Natural Language Toolkit: Text TreesCOMMENT
LOWnltk/tree/parented.py1# Natural Language Toolkit: Text TreesCOMMENT
LOWnltk/tree/tree.py1# Natural Language Toolkit: Text TreesCOMMENT
LOWnltk/tree/parsing.py1# Natural Language Toolkit: Text TreesCOMMENT
LOWnltk/tree/probabilistic.py1# Natural Language Toolkit: Text TreesCOMMENT
LOWnltk/metrics/confusionmatrix.py61 indices = {val: i for (i, val) in enumerate(values)}COMMENT
LOWnltk/app/srparser_app.py821 # Display the available productions.COMMENT
LOWnltk/app/srparser_app.py841 # color='#000000', font=self._font)COMMENT
LOWnltk/app/chartparser_app.py2561 # ChartComparer(*charts).mainloop()COMMENT
LOWnltk/app/wordnet_app.py221 :param port: The port number for the server to listen on, defaults toCOMMENT
LOWnltk/classify/weka.py181 " Header: %s" % lines[0]COMMENT
LOWnltk/classify/api.py161# strs or ints, but can be any immutable type. The setCOMMENT
LOWnltk/classify/api.py181# the *i*\ th element of ``featuresets``.COMMENT
LOWnltk/chunk/regexp.py881 return "<ChunkRuleWithContext: {!r}, {!r}, {!r}>".format(COMMENT
LOWnltk/test/pytest.ini1[pytest]COMMENT
LOWnltk/test/unit/test_distance.py21 # Allowing transpositions reduces the number of edits required.COMMENT
LOWnltk/test/unit/test_distance.py41 # Ought to have the same results with and without transpositionsCOMMENT
LOWnltk/test/unit/test_distance.py61 #COMMENT
LOWnltk/test/unit/test_distance.py81 # without transpositions:COMMENT
LOWnltk/test/unit/lm/test_models.py101def test_mle_bigram_entropy_perplexity_unseen(mle_bigram_model):COMMENT
LOWnltk/test/unit/lm/test_models.py161 return modelCOMMENT
LOWnltk/test/unit/lm/test_models.py261 ("d", ["c"], 2.0 / 9),COMMENT
LOWnltk/test/unit/lm/test_models.py321 "word, context, expected_score",COMMENT
LOWnltk/test/unit/lm/test_models.py381 # = 1 / 14COMMENT
LOWnltk/test/unit/lm/test_models.py441 # P(c|b) = alpha('bc') + gamma('b') * P(c)COMMENT
LOWnltk/chat/zen.py81 ),COMMENT
LOWnltk/chat/eliza.py1# Natural Language Toolkit: ElizaCOMMENT
LOWnltk/translate/phrase_based.py1# Natural Language Toolkit: Phrase Extraction AlgorithmCOMMENT
LOWnltk/translate/ibm1.py1# Natural Language Toolkit: IBM Model 1COMMENT
LOWnltk/translate/ribes_score.py201 # (an O(L^2) scan) for every context window, giving up to O(L^4) time: aCOMMENT
LOWnltk/sem/chat80.py641COMMENT
LOWnltk/sem/hole.py221 plug_acc = plug_acc0.copy()COMMENT
LOWnltk/sem/boxer.py481 # if cat == 'des':COMMENT
LOWnltk/corpus/__init__.py501# ipipan = LazyCorpusLoader(COMMENT
LOWnltk/corpus/reader/bracket_parse.py21TAGWORD = re.compile(r"\(([^\s()]+) ([^\s()]+)\)")COMMENT
LOWnltk/corpus/reader/framenet.py3341COMMENT
LOWnltk/corpus/reader/framenet.py3441 print("\nNames of all of the corpora used for fulltext annotation:")COMMENT
LOWnltk/corpus/reader/senseval.py181 # remove <@>, <p>, </p>COMMENT
LOWnltk/corpus/reader/xmldocs.py1# Natural Language Toolkit: XML Corpus ReaderCOMMENT
LOWnltk/corpus/reader/wordnet.py1# Natural Language Toolkit: WordNetCOMMENT
LOWnltk/corpus/reader/wordnet.py41COMMENT
LOWnltk/corpus/reader/wordnet.py981 # Get the longest path from the LCS to the root,COMMENT
36 more matches not shown…
Redundant / Tautological Comments53 hits · 79 pts
SeverityFileLineSnippetContext
LOWnltk/jsontags.py64 # Check if we have a tagged object.COMMENT
LOWnltk/internals.py396# Check if a method has been overriddenCOMMENT
LOWnltk/internals.py615 # Check if the alternative is inside a 'file' directoryCOMMENT
LOWnltk/internals.py631 # Check if the environment variable contains a direct path to the binCOMMENT
LOWnltk/internals.py637 # Check if the possible bin names exist inside the environment variable directoriesCOMMENT
LOWnltk/internals.py645 # Check if the alternative is inside a 'file' directoryCOMMENT
LOWnltk/internals.py648 # Check if the alternative is inside a 'bin' directoryCOMMENT
LOWnltk/downloader.py1144 # Check if the file has the correct size.COMMENT
LOWnltk/downloader.py1152 # Check if the file's checksum matches.COMMENT
LOWnltk/downloader.py1212 # Check if the index is already up-to-date. If so, do nothing.COMMENT
LOWnltk/downloader.py1338 # Check if we are on GAE where we cannot write into filesystem.COMMENT
LOWnltk/downloader.py1342 # Check if we have sufficient permissions to install in aCOMMENT
LOWnltk/downloader.py2427 # Check if we've been told to kill ourselves:COMMENT
LOWnltk/util.py679 queue.append(child) # Add child to queueCODE
LOWnltk/__init__.py181# Check if tkinter exists without importing it to avoid crashes afterCOMMENT
LOWnltk/collections.py468 # Return the valueCOMMENT
LOWnltk/probability.py2499 # Print the results in a formatted table.COMMENT
LOWnltk/featstruct.py1788 # Print the result.COMMENT
LOWnltk/featstruct.py2363 # Check if it's a special feature.COMMENT
LOWnltk/featstruct.py2369 # Check if this feature has a value already.COMMENT
LOWnltk/data.py753 # Check if the resource name includes a zipfile nameCOMMENT
LOWnltk/data.py1758 # Return the resultCOMMENT
LOWnltk/app/chunkparser_app.py714 # Check if we've seen this grammar already. If so, thenCOMMENT
LOWnltk/app/chunkparser_app.py748 # Check if we're doneCOMMENT
LOWnltk/app/chunkparser_app.py1301 # Display the resultsCOMMENT
LOWnltk/app/rdparser_app.py644 # Check if we just completed a parse.COMMENT
LOWnltk/app/chartparser_app.py1273 # Check if we can fit the edge in this level.COMMENT
LOWnltk/app/wordnet_app.py158 # Set type to plain to prevent XSS by printing the path as HTMLCOMMENT
LOWnltk/classify/weka.py125 # Check if something went wrong:COMMENT
LOWnltk/classify/weka.py350 # Check if the tokens are labeled or unlabeled. If unlabeled,COMMENT
LOWnltk/classify/maxent.py726 # Return the resultCOMMENT
LOWnltk/classify/megam.py100 # Write the file, which contains one line per instance.COMMENT
LOWnltk/translate/phrase_based.py71 # Check if alignment points are consistent.COMMENT
LOWnltk/corpus/reader/util.py248 # Check if it's in the cache.COMMENT
LOWnltk/corpus/reader/util.py260 # Check if it's in the cache.COMMENT
LOWnltk/corpus/reader/wordnet.py1923 # Open the file for reading. Note that we can not re-useCOMMENT
LOWnltk/parse/pchart.py266 # Assign probabilities to the trees.COMMENT
LOWnltk/parse/chart.py685 # Add it to the list of edges.COMMENT
LOWnltk/parse/nonprojectivedependencyparser.py628 # Set roots to attemptCOMMENT
LOWnltk/parse/earleychart.py539 # Print results.COMMENT
LOWnltk/stem/porter.py719 # Print the results.COMMENT
LOWnltk/stem/lancaster.py176 # Check if a user wants to strip prefixCOMMENT
LOWnltk/stem/lancaster.py178 # Check if a user wants to use his/her own rule tuples.COMMENT
LOWnltk/inference/tableau.py143 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/inference/tableau.py166 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/inference/tableau.py189 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/inference/tableau.py203 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/tag/brill_trainer.py531 # Check if the change causes any rule at this position toSTRING
LOWnltk/tag/brill_trainer.py540 # Check if the change causes our templates to propose anySTRING
LOWnltk/tokenize/punkt.py1694 # Check if any initials or ordinals tokens that are markedCOMMENT
LOWnltk/ccg/chart.py178 # Check if the two edges are permitted to combine.COMMENT
LOWnltk/ccg/chart.py311 # Output the resulting parsesCOMMENT
LOWnltk/ccg/chart.py443 # Print the resulting category on a new line.COMMENT
Modern Structural Boilerplate34 hits · 31 pts
SeverityFileLineSnippetContext
LOWnltk/jsontags.py76__all__ = ["register_tag", "json_tags", "JSONTaggedEncoder", "JSONTaggedDecoder"]CODE
LOWnltk/pathsec.py586__all__ = [CODE
LOWnltk/treeprettyprinter.py28__all__ = ["TreePrettyPrinter"]CODE
LOWnltk/grammar.py1732__all__ = [CODE
LOWnltk/text.py818__all__ = [CODE
LOWnltk/probability.py2553__all__ = [CODE
LOWnltk/treetransforms.py126__all__ = ["chomsky_normal_form", "un_chomsky_normal_form", "collapse_unary"]STRING
LOWnltk/collocations.py417__all__ = [CODE
LOWnltk/featstruct.py2774__all__ = [STRING
LOWnltk/data.py1823__all__ = [CODE
LOWnltk/decorators.py16__all__ = ["decorator", "new_wrapper", "getinfo"]CODE
LOWnltk/tree/immutable.py119__all__ = [CODE
LOWnltk/tree/transforms.py344__all__ = ["chomsky_normal_form", "un_chomsky_normal_form", "collapse_unary"]CODE
LOWnltk/tree/parented.py587__all__ = [CODE
LOWnltk/tree/tree.py985__all__ = [STRING
LOWnltk/tree/parsing.py63__all__ = [CODE
LOWnltk/tree/__init__.py37__all__ = [CODE
LOWnltk/tree/probabilistic.py74__all__ = ["ProbabilisticTree"]CODE
LOWnltk/tree/prettyprinter.py624__all__ = ["TreePrettyPrinter"]CODE
LOWnltk/app/concordance_app.py709__all__ = ["app"]CODE
LOWnltk/app/chunkparser_app.py1500__all__ = ["app"]CODE
LOWnltk/app/rdparser_app.py1052__all__ = ["app"]CODE
LOWnltk/app/srparser_app.py937__all__ = ["app"]CODE
LOWnltk/app/wordfreq_app.py36__all__ = ["app"]CODE
LOWnltk/app/chartparser_app.py2570__all__ = ["app"]CODE
LOWnltk/app/collocations_app.py438__all__ = ["app"]CODE
LOWnltk/app/nemo_app.py163__all__ = ["app"]STRING
LOWnltk/app/wordnet_app.py1035__all__ = ["app"]STRING
LOWnltk/classify/scikitlearn.py43__all__ = ["SklearnClassifier"]CODE
LOWnltk/lm/__init__.py225__all__ = [CODE
LOWnltk/corpus/reader/__init__.py114__all__ = [CODE
LOWnltk/parse/bllip.py82__all__ = ["BllipParser"]CODE
LOWnltk/parse/nonprojectivedependencyparser.py15logger = logging.getLogger(__name__)CODE
LOWnltk/huggingface/__init__.py9__all__ = ["download"]CODE
AI Slop Vocabulary22 hits · 29 pts
SeverityFileLineSnippetContext
MEDIUMnltk/util.py251 # FIX: Use is_relative_to for robust boundary checkCOMMENT
LOWnltk/collections.py267 # If the slice is small enough, just use a tuple.COMMENT
LOWnltk/text.py123 # nothing in common -- just return an empty freqdist.COMMENT
LOWnltk/probability.py1330# Simple Good-Turing. As a smoothing curve they simply use a power curve:COMMENT
LOWnltk/featstruct.py319 # their children a second time, so just return true.COMMENT
LOWnltk/data.py1111 # If we've cached the resource, then just return it.COMMENT
LOWnltk/data.py1684 # If nothing's buffered, then just return our current filepos:COMMENT
LOWnltk/app/chunkparser_app.py715 # just use the old evaluation values.COMMENT
LOWnltk/test/unit/test_downloader.py88 # Cannot mock a zip here as we are trying to validate file checksums, so just create a simple one with the XMLCOMMENT
LOWnltk/translate/ribes_score.py351 # To avoid this, we can just return the lowest possible score.COMMENT
MEDIUMnltk/sem/drt.py151 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/drt.py156 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/logic.py456 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/logic.py494 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/logic.py515 """This method serves as a hook for other logic parsers thatSTRING
LOWnltk/corpus/__init__.py194# [XX] This should probably just use TaggedCorpusReader:COMMENT
LOWnltk/corpus/reader/verbnet.py167 # File identifier: just return the xml.COMMENT
LOWnltk/corpus/reader/framenet.py1161 # as it's easier to just call frame().COMMENT
LOWnltk/corpus/reader/semcor.py201 # solution: just use the lemma name as a stringCOMMENT
LOWnltk/parse/chart.py1230 # just return (no new edges to add).STRING
LOWnltk/parse/featurechart.py375 # just return (no new edges to add).STRING
LOWnltk/parse/featurechart.py560 # already in the chart, then just return it as-is.STRING
Modern AI Meta-Vocabulary4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMnltk/translate/ribes_score.py201 # (an O(L^2) scan) for every context window, giving up to O(L^4) time: aCOMMENT
MEDIUMnltk/translate/ribes_score.py260 # A context window longer than the reference can never occur in itCOMMENT
MEDIUMnltk/translate/ribes_score.py269 # Retrieve the right context window.COMMENT
MEDIUMnltk/translate/ribes_score.py284 # Retrieve the left context window.COMMENT
AI Structural Patterns11 hits · 10 pts
SeverityFileLineSnippetContext
LOWnltk/downloader.py201CODE
LOWnltk/downloader.py991CODE
LOWnltk/tree/prettyprinter.py331CODE
LOWnltk/metrics/agreement.py209CODE
LOWnltk/metrics/agreement.py361CODE
LOWnltk/twitter/twitterclient.py320CODE
LOWnltk/corpus/reader/conll.py67CODE
LOWnltk/tbl/demo.py141CODE
LOWnltk/sentiment/util.py327CODE
LOWnltk/tokenize/stanford_segmenter.py55CODE
LOWnltk/tokenize/texttiling.py67CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMnltk/app/chunkparser_app.py114 #: for a list of tags you can use for colorizing.COMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMnltk/app/chartparser_app.py628CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWnltk/app/nemo_app.py18Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliCODE
LOWnltk/app/nemo_app.py18Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliCODE