Repository Analysis

nltk/nltk

NLTK Source

23.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of nltk/nltk, a Python project with 14,706 GitHub stars. SynthScan v2.0 examined 181,833 lines of code across 585 source files, recording 3244 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 23.5 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).

23.5
Adjusted Score
23.5
Raw Score
100%
Time Factor
2026-08-28
Last Push
14.7K
Stars
Python
Language
181.8K
Lines of Code
585
Files
3.2K
Pattern Hits
2026-08-29
Scan Date
0.15
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 309LOW 2845

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 3244 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 Identifiers1434 hits · 1477 pts
SeverityFileLineSnippetContext
LOWnltk/internals.py927def _reject_cwd_relative_bare_match(filename, matches, kind):CODE
LOWnltk/tgrep.py298def _tgrep_node_literal_value(node):CODE
LOWnltk/tgrep.py387def _tgrep_nltk_tree_pos_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py634def _tgrep_conjunction_action(_s, _l, tokens, join_char="&"):CODE
LOWnltk/tgrep.py669def _tgrep_segmented_pattern_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py711def _tgrep_node_label_use_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py730def _tgrep_node_label_pred_use_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py759def _tgrep_bind_node_label_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py798def _tgrep_rel_disjunction_action(_s, _l, tokens):CODE
LOWnltk/downloader.py1522 def _simple_interactive_download(self, args):CODE
LOWnltk/downloader.py1552 def _simple_interactive_update(self):CODE
LOWnltk/downloader.py1603 def _simple_interactive_config(self):CODE
LOWnltk/util.py393def unweighted_minimum_spanning_digraph(tree, children=iter, shapes=None, attr=None):CODE
LOWnltk/util.py561def acyclic_branches_depth_first(CODE
LOWnltk/util.py698def unweighted_minimum_spanning_dict(tree, children=iter):CODE
LOWnltk/util.py743def unweighted_minimum_spanning_tree(tree, children=iter):CODE
LOWnltk/pathsec.py315def _reject_colliding_members(members):CODE
LOWnltk/pathsec.py509def _reject_aliased_or_special(text, context, check_links=False):CODE
LOWnltk/pathsec.py1015def _resolve_and_validate_host(host, port):CODE
LOWnltk/pathsec.py1129def _reject_unpinnable_proxied_fetch(url_str):CODE
LOWnltk/grammar.py725 def is_flexible_chomsky_normal_form(self):CODE
LOWnltk/grammar.py1524def _read_dependency_production(s):CODE
LOWnltk/picklesec.py39def _reject_extension_opcodes(pickle_source: Any) -> None:CODE
LOWnltk/featstruct.py1707def _apply_forwards_to_bindings(forward, bindings):CODE
LOWnltk/data.py65def _assert_no_encoded_bypass(name, error_label=None):CODE
LOWnltk/data.py103def _assert_no_normalized_bypass(name, error_label=None):CODE
LOWnltk/data.py127def _reject_unsafe_no_protocol(resource_url):CODE
LOWnltk/data.py238def _staging_dir_is_still_safe(path):CODE
LOWnltk/data.py363 def _nltk_wrap_secure_fileobj(cls, filename, fileobj):CODE
LOWnltk/data.py859def _check_decompression_bomb(info):CODE
LOWnltk/data.py901def _reject_decompression_total(total, compress_size, name, kind):CODE
LOWnltk/tree/tree.py433 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.py231 def _chance_corrected_agreement(self, observed, expected):CODE
LOWnltk/metrics/distance.py41def _check_distance_input_len(s1, s2, func_name):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.py210def get_unique_counter_from_url(sp):CODE
LOWnltk/app/wordnet_app.py930def get_static_welcome_message():STRING
LOWnltk/classify/util.py171def binary_names_demo_features(name):CODE
LOWnltk/classify/maxent.py1129def calculate_empirical_fcount(train_toks, encoding):CODE
LOWnltk/classify/maxent.py1139def calculate_estimated_fcount(classifier, train_toks, encoding):CODE
LOWnltk/classify/maxent.py211 def most_informative_features(self, n=10):CODE
LOWnltk/classify/maxent.py225 def show_most_informative_features(self, n=10, show="all"):CODE
LOWnltk/classify/maxent.py1033def train_maxent_classifier_with_gis(CODE
LOWnltk/classify/maxent.py1157def train_maxent_classifier_with_iis(CODE
LOWnltk/classify/maxent.py1410def 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/conftest.py10def _authorize_pytest_basetemp(tmp_path_factory):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_quadratic_dos.py56 def test_correctness_preserved(self):CODE
1374 more matches not shown…
Decorative Section Separators183 hits · 707 pts
SeverityFileLineSnippetContext
MEDIUMnltk/langnames.py131# =======================================================================COMMENT
MEDIUMnltk/langnames.py257# ======================================================================COMMENT
MEDIUMnltk/downloader.py70# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/downloader.py997 # ---------------------------------------------------COMMENT
MEDIUMnltk/downloader.py2744 # -----------------------------------------------------------COMMENT
MEDIUMnltk/util.py479# ==========================================================================COMMENT
MEDIUMnltk/util.py695# ==========================================================================COMMENT
MEDIUMnltk/tabdata.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py98# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py100# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/data.py519 # ----------------------------------------------------------------------STRING
MEDIUMnltk/data.py521 # ----------------------------------------------------------------------STRING
MEDIUMnltk/chunk/named_entity.py322# ======================================================================================COMMENT
MEDIUMnltk/chunk/named_entity.py401# ======================================================================================COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py50# ==========================================================================COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py52# ==========================================================================COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py162# ==========================================================================COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py164# ==========================================================================COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py382# ==========================================================================COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py384# ==========================================================================COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py127# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py129# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py147# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py149# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py163# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py165# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py190# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py192# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py205# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py207# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py242# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py244# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py267# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py269# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py278# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py280# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py307# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_pathsec_sweep_dataset_loading.py309# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_hardening.py40# ----------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_hardening.py42# ----------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_hardening.py105# ----------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_hardening.py107# ----------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_hardening.py125# ----------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_hardening.py127# ----------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_aline.py87# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_aline.py89# ---------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_tokenize_stanford_pathsec.py95# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_tokenize_stanford_pathsec.py97# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_tokenize_stanford_pathsec.py192# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_tokenize_stanford_pathsec.py194# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_tokenize_stanford_pathsec.py230# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_tokenize_stanford_pathsec.py232# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py312# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py318# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py146# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py148# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py523# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py528# ---------------------------------------------------------------------------COMMENT
MEDIUM…k/test/unit/test_module_import_and_functional_smoke.py78# ---------------------------------------------------------------------------COMMENT
123 more matches not shown…
Unused Imports656 hits · 582 pts
SeverityFileLineSnippetContext
LOWtools/find_deprecated.py30CODE
LOWnltk/internals.py22CODE
LOWnltk/downloader.py173CODE
LOWnltk/toolbox.py13CODE
LOWnltk/util.py31CODE
LOWnltk/util.py32CODE
LOWnltk/util.py32CODE
LOWnltk/__init__.py23CODE
LOWnltk/__init__.py111CODE
LOWnltk/__init__.py141CODE
LOWnltk/__init__.py142CODE
LOWnltk/__init__.py142CODE
LOWnltk/__init__.py143CODE
LOWnltk/__init__.py144CODE
LOWnltk/__init__.py145CODE
LOWnltk/__init__.py146CODE
LOWnltk/__init__.py147CODE
LOWnltk/__init__.py148CODE
LOWnltk/__init__.py154CODE
LOWnltk/__init__.py155CODE
LOWnltk/__init__.py156CODE
LOWnltk/__init__.py157CODE
LOWnltk/__init__.py158CODE
LOWnltk/__init__.py159CODE
LOWnltk/__init__.py160CODE
LOWnltk/__init__.py161CODE
LOWnltk/__init__.py162CODE
LOWnltk/__init__.py163CODE
LOWnltk/__init__.py164CODE
LOWnltk/__init__.py187CODE
LOWnltk/__init__.py187CODE
LOWnltk/__init__.py207CODE
LOWnltk/__init__.py207CODE
LOWnltk/__init__.py207CODE
LOWnltk/__init__.py207CODE
LOWnltk/__init__.py208CODE
LOWnltk/__init__.py208CODE
LOWnltk/__init__.py208CODE
LOWnltk/__init__.py208CODE
LOWnltk/__init__.py208CODE
LOWnltk/__init__.py208CODE
LOWnltk/__init__.py209CODE
LOWnltk/__init__.py209CODE
LOWnltk/__init__.py209CODE
LOWnltk/__init__.py209CODE
LOWnltk/__init__.py209CODE
LOWnltk/__init__.py209CODE
LOWnltk/__init__.py210CODE
LOWnltk/__init__.py210CODE
LOWnltk/__init__.py210CODE
LOWnltk/__init__.py210CODE
LOWnltk/__init__.py210CODE
LOWnltk/__init__.py210CODE
LOWnltk/__init__.py115CODE
LOWnltk/__init__.py181CODE
LOWnltk/__init__.py185CODE
LOWnltk/__init__.py194CODE
LOWnltk/grammar.py1589CODE
LOWnltk/book.py9CODE
LOWnltk/book.py18CODE
596 more matches not shown…
Deep Nesting386 hits · 356 pts
SeverityFileLineSnippetContext
LOWtools/find_deprecated.py116CODE
LOWtools/find_deprecated.py151CODE
LOWtools/check_no_unsandboxed_open.py54CODE
LOWnltk/internals.py225CODE
LOWnltk/internals.py792CODE
LOWnltk/internals.py1062CODE
LOWnltk/internals.py1474CODE
LOWnltk/tgrep.py322CODE
LOWnltk/tgrep.py403CODE
LOWnltk/downloader.py2680CODE
LOWnltk/downloader.py2947CODE
LOWnltk/downloader.py579CODE
LOWnltk/downloader.py738CODE
LOWnltk/downloader.py1053CODE
LOWnltk/downloader.py1168CODE
LOWnltk/downloader.py1270CODE
LOWnltk/downloader.py1481CODE
LOWnltk/downloader.py1522CODE
LOWnltk/downloader.py1552CODE
LOWnltk/downloader.py1603CODE
LOWnltk/downloader.py2016CODE
LOWnltk/downloader.py2112CODE
LOWnltk/downloader.py2180CODE
LOWnltk/downloader.py2271CODE
LOWnltk/downloader.py2505CODE
LOWnltk/toolbox.py281CODE
LOWnltk/toolbox.py468CODE
LOWnltk/util.py229CODE
LOWnltk/util.py308CODE
LOWnltk/util.py350CODE
LOWnltk/util.py439CODE
LOWnltk/util.py482CODE
LOWnltk/util.py561CODE
LOWnltk/util.py647CODE
LOWnltk/util.py698CODE
LOWnltk/util.py1231CODE
LOWnltk/pathsec.py149CODE
LOWnltk/pathsec.py760CODE
LOWnltk/pathsec.py890CODE
LOWnltk/pathsec.py935CODE
LOWnltk/pathsec.py1170CODE
LOWnltk/grammar.py1374CODE
LOWnltk/grammar.py1439CODE
LOWnltk/grammar.py563CODE
LOWnltk/grammar.py854CODE
LOWnltk/cli.py42CODE
LOWnltk/collections.py63CODE
LOWnltk/collections.py396CODE
LOWnltk/probability.py693CODE
LOWnltk/featstruct.py1169CODE
LOWnltk/featstruct.py1254CODE
LOWnltk/featstruct.py1586CODE
LOWnltk/featstruct.py2641CODE
LOWnltk/featstruct.py154CODE
LOWnltk/featstruct.py642CODE
LOWnltk/featstruct.py680CODE
LOWnltk/featstruct.py698CODE
LOWnltk/featstruct.py777CODE
LOWnltk/featstruct.py821CODE
LOWnltk/featstruct.py957CODE
326 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_pathsec_sweep_transitionparser.py0economic jj 2 att news nn 3 sbj has vbd 0 root little jj 5 att effect nn 3 obj on in 5 att financial jj 8 att markets nnSTRING
HIGHnltk/test/unit/test_pickle_load_warnings.py0economic jj 2 att news nn 3 sbj has vbd 0 root little jj 5 att effect nn 3 obj on in 5 att financial jj 8 att markets nnSTRING
HIGHnltk/test/unit/test_pickle_allowlist_security.py0economic jj 2 att news nn 3 sbj has vbd 0 root little jj 5 att effect nn 3 obj on in 5 att financial jj 8 att markets nnSTRING
HIGHnltk/test/unit/test_reviews_security.py0run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the wSTRING
HIGHnltk/test/unit/test_chunk_redos_security.py0run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the wSTRING
HIGHnltk/test/unit/test_texttiling_security.py0run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the wSTRING
HIGHnltk/test/unit/test_inference_security.py0run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the wSTRING
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.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…
Excessive Try-Catch Wrapping166 hits · 191 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
LOWnltk/internals.py249 except Exception:CODE
LOWnltk/internals.py260 except Exception:CODE
LOWnltk/internals.py274 except Exception:CODE
MEDIUMnltk/downloader.py1515 print("Error reading from server: %s" % e)CODE
MEDIUMnltk/downloader.py1517 print("Error connecting to server: %s" % e.reason)CODE
MEDIUMnltk/downloader.py1631 print(f"Error reading <{new_url!r}>:\n {e}")CODE
MEDIUMnltk/downloader.py766def _within(child, root):CODE
LOWnltk/downloader.py1382 except Exception:CODE
LOWnltk/downloader.py1630 except Exception as e:CODE
LOWnltk/downloader.py2361 except Exception:CODE
LOWnltk/downloader.py2712 except Exception as e:CODE
LOWnltk/downloader.py2765 except Exception as e:CODE
LOWnltk/downloader.py2785 except Exception as e:CODE
LOWnltk/downloader.py2788 except Exception as e:CODE
LOWnltk/downloader.py2969 except Exception as e:CODE
LOWnltk/downloader.py2973 except Exception as e:CODE
LOWnltk/pathsec.py278 except Exception:CODE
LOWnltk/pathsec.py1002 except Exception:CODE
LOWnltk/picklesec.py62 except Exception:CODE
LOWnltk/featstruct.py2738 except Exception:STRING
LOWnltk/data.py980 except Exception as e:CODE
LOWnltk/metrics/distance.py306 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/app/wordnet_app.py742 except Exception as e:STRING
LOWnltk/classify/weka.py96 except Exception:CODE
MEDIUMnltk/classify/weka.py89def _check_weka_version(jar):CODE
MEDIUMnltk/test/unit/test_corpus_reader_pathsec.py372def _under_attacker_root(p):CODE
LOWnltk/test/unit/test_corpus_reader_pathsec.py375 except Exception:CODE
LOWnltk/test/unit/test_corpus_reader_pathsec.py405 except Exception:CODE
LOWnltk/test/unit/test_corpus_reader_pathsec.py440 except Exception:CODE
LOWnltk/test/unit/test_corpus_reader_pathsec.py454 except Exception:CODE
106 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.py1083 # Define a helper function for displaying output:COMMENT
MEDIUMnltk/downloader.py1749 # Create the main window.COMMENT
MEDIUMnltk/downloader.py1796 # Create the top-level frame structuresCOMMENT
MEDIUMnltk/downloader.py1819 # Create the tabsCOMMENT
MEDIUMnltk/downloader.py1828 # Create the table.COMMENT
MEDIUMnltk/downloader.py1934 # Create a menu to control which columns of the table areCOMMENT
MEDIUMnltk/downloader.py1949 # Create a sort menuCOMMENT
MEDIUMnltk/downloader.py2449 # Create a new data server object for the download operation,COMMENT
MEDIUMnltk/toolbox.py332 """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.py217 # Create the pretty lines with the query_word in the middle.COMMENT
MEDIUMnltk/text.py224 # Create the ConcordanceLineCOMMENT
MEDIUMnltk/text.py623 # 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.py2262 # 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.py1958 """This class represents implications"""STRING
MEDIUMnltk/sem/logic.py1965 """This class represents biconditionals"""STRING
MEDIUMnltk/sem/logic.py1972 """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.py1487 """This class represents a variable to be used as a predicate or entity"""STRING
MEDIUMnltk/sem/logic.py1559 """This class represents variables that take the form of a single lowercaseSTRING
MEDIUMnltk/sem/logic.py1589 """This class represents variables that take the form of a single uppercaseSTRING
MEDIUMnltk/sem/logic.py1604 """This class represents variables that take the form of a single lowercaseSTRING
MEDIUMnltk/sem/logic.py1611 """This class represents variables that do not take the form of a singleSTRING
MEDIUMnltk/sem/logic.py1932 """This class represents conjunctions"""STRING
MEDIUMnltk/sem/logic.py1945 """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.py517 # Create a new node v_n+1 with address = len(nodes) + 1COMMENT
MEDIUMnltk/parse/featurechart.py203 # Create the index.COMMENT
MEDIUMnltk/parse/featurechart.py287 # Create a copy of the bindings.STRING
MEDIUMnltk/parse/featurechart.py300 # 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.py1130 fcount = numpy.zeros(encoding.length(), "d")CODE
HIGHnltk/classify/maxent.py1140 fcount = numpy.zeros(encoding.length(), "d")CODE
HIGHnltk/classify/maxent.py123 assert encoding.length() == len(weights)CODE
HIGHnltk/classify/maxent.py135 assert self._encoding.length() == len(new_weights)CODE
HIGHnltk/classify/maxent.py244 self._encoding.length(),CODE
HIGHnltk/classify/maxent.py1351 deltas = numpy.ones(encoding.length(), "d")STRING
HIGHnltk/classify/maxent.py1356 A = numpy.zeros((len(nfmap), encoding.length()), "d")STRING
HIGHnltk/classify/maxent.py1496 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
Over-Commented Block115 hits · 107 pts
SeverityFileLineSnippetContext
LOWtools/global_replace.py1#!/usr/bin/env pythonCOMMENT
LOWtools/github_actions/third-party.sh101COMMENT
LOWnltk/internals.py21COMMENT
LOWnltk/internals.py41#COMMENT
LOWnltk/internals.py61 {"-server", "-client", "-xbatch", "-xint", "-xcomp", "-xmixed"}COMMENT
LOWnltk/internals.py381 # Rebuild from the verified entries only; never pass the raw string to -cp.COMMENT
LOWnltk/downloader.py741COMMENT
LOWnltk/downloader.py781 breakCOMMENT
LOWnltk/pathsec.py1201 # apply: build_opener() would install a default ProxyHandler fromCOMMENT
LOWnltk/grammar.py1# Natural Language Toolkit: Context Free GrammarsCOMMENT
LOWnltk/text.py261#: :meth:`Text.findall`). The search applies an attacker-influenceable tokenCOMMENT
LOWnltk/redos.py61#: Wall-clock seconds any single caller-supplied-pattern match may run before itCOMMENT
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/data.py761#: i.e. payloads crafted purely to maximize expansion; legitimate text/markupCOMMENT
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/metrics/distance.py21COMMENT
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.py241 # 'Shutdown' that first shutsdown the server and closes the window orCOMMENT
LOWnltk/classify/weka.py201 "of weka may not be supported.\n"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/classify/maxent.py1361 for label in encoding.labels():COMMENT
LOWnltk/chunk/regexp.py901COMMENT
LOWnltk/test/pytest.ini1[pytest]COMMENT
LOWnltk/test/unit/test_quadratic_dos.py221 def test_low_vowel_run_is_linear_and_unbounded(self):COMMENT
LOWnltk/test/unit/test_distance.py21 "left,right,substitution_cost,expecteds",COMMENT
LOWnltk/test/unit/test_distance.py41 #COMMENT
LOWnltk/test/unit/test_distance.py61 # with transpositions:COMMENT
LOWnltk/test/unit/test_distance.py81 # with transpositions:COMMENT
LOWnltk/test/unit/test_pickle_allowlist_security.py301 restored = punkt_pickle_load(io.BytesIO(pickle.dumps(obj, protocol=4)))COMMENT
LOWnltk/test/unit/test_tokenize.py1001COMMENT
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/sem/chat80.py701 else:COMMENT
LOWnltk/sem/hole.py221 plug_acc = plug_acc0.copy()COMMENT
LOWnltk/sem/boxer.py241 temp_filename,COMMENT
LOWnltk/sem/boxer.py481 def _handle_duplex(self):COMMENT
55 more matches not shown…
Redundant / Tautological Comments53 hits · 79 pts
SeverityFileLineSnippetContext
LOWnltk/jsontags.py64 # Check if we have a tagged object.COMMENT
LOWnltk/internals.py614# Check if a method has been overriddenCOMMENT
LOWnltk/internals.py833 # Check if the alternative is inside a 'file' directoryCOMMENT
LOWnltk/internals.py853 # Check if the environment variable contains a direct path to the binCOMMENT
LOWnltk/internals.py859 # Check if the possible bin names exist inside the environment variable directoriesCOMMENT
LOWnltk/internals.py867 # Check if the alternative is inside a 'file' directoryCOMMENT
LOWnltk/internals.py870 # Check if the alternative is inside a 'bin' directoryCOMMENT
LOWnltk/downloader.py1206 # Check if the file has the correct size.COMMENT
LOWnltk/downloader.py1214 # Check if the file's checksum matches.COMMENT
LOWnltk/downloader.py1275 # Check if the index is already up-to-date. If so, do nothing.COMMENT
LOWnltk/downloader.py1404 # Check if we are on GAE where we cannot write into filesystem.COMMENT
LOWnltk/downloader.py1408 # Check if we have sufficient permissions to install in aCOMMENT
LOWnltk/downloader.py2493 # Check if we've been told to kill ourselves:COMMENT
LOWnltk/util.py738 queue.append(child) # Add child to queueCODE
LOWnltk/__init__.py189# 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.py2374 # Check if it's a special feature.COMMENT
LOWnltk/featstruct.py2380 # Check if this feature has a value already.COMMENT
LOWnltk/data.py1133 # Check if the resource name includes a zipfile nameCOMMENT
LOWnltk/data.py2144 # 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.py143 # Check if something went wrong:COMMENT
LOWnltk/classify/weka.py373 # Check if the tokens are labeled or unlabeled. If unlabeled,COMMENT
LOWnltk/classify/maxent.py731 # 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.py646 # Set roots to attemptCOMMENT
LOWnltk/parse/earleychart.py539 # Print results.COMMENT
LOWnltk/stem/porter.py736 # 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.py1739 # 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
AI Slop Vocabulary27 hits · 46 pts
SeverityFileLineSnippetContext
MEDIUMnltk/util.py259 # 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.py124 # 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
MEDIUMnltk/picklesec.py382 # scipy.datasets network + cache fetchers, robust to a submodule move.COMMENT
LOWnltk/featstruct.py319 # their children a second time, so just return true.COMMENT
LOWnltk/data.py1494 # If we've cached the resource, then just return it.COMMENT
LOWnltk/data.py2070 # If nothing's buffered, then just return our current filepos:COMMENT
LOWnltk/app/chunkparser_app.py715 # just use the old evaluation values.COMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py155 # O(n). A ratio test is robust to the (high) linear constant: 4x inputCOMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py236 # This is a wall-clock ratio test, so it must be robust to CI timingCOMMENT
MEDIUMnltk/test/unit/test_quadratic_dos.py240 # (2) the MEDIAN of a few runs, robust to both a fast and a slow outlier.COMMENT
MEDIUMnltk/test/unit/test_stopwords_extended.py115 # paradigm completions (NLTK already has `should've`, `mustn't`, ...)COMMENT
LOWnltk/test/unit/test_downloader.py89 # 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.py368 # 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.py529 """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.py1183 # 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.py377 # just return (no new edges to add).STRING
LOWnltk/parse/featurechart.py562 # already in the chart, then just return it as-is.STRING
Modern Structural Boilerplate37 hits · 34 pts
SeverityFileLineSnippetContext
LOWnltk/jsontags.py76__all__ = ["register_tag", "json_tags", "JSONTaggedEncoder", "JSONTaggedDecoder"]CODE
LOWnltk/pathsec.py1622__all__ = [CODE
LOWnltk/xmlsec.py60__all__ = ["HAVE_DEFUSEDXML", "EntitiesForbidden", "fromstring", "parse"]CODE
LOWnltk/treeprettyprinter.py28__all__ = ["TreePrettyPrinter"]CODE
LOWnltk/grammar.py1744__all__ = [CODE
LOWnltk/text.py822__all__ = [CODE
LOWnltk/redos.py59__all__ = ["DEFAULT_TIMEOUT", "TimedPattern", "compile"]STRING
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.py2801__all__ = [STRING
LOWnltk/data.py2209__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.py1037__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.py1062__all__ = ["app"]STRING
LOWnltk/classify/scikitlearn.py43__all__ = ["SklearnClassifier"]CODE
LOWnltk/test/unit/security_probes/__init__.py26__all__ = ["PROBES", "FIXED", "VULNERABLE", "STATIC", "BENIGN", "run"]CODE
LOWnltk/lm/__init__.py225__all__ = [CODE
LOWnltk/corpus/reader/__init__.py118__all__ = [CODE
LOWnltk/parse/bllip.py82__all__ = ["BllipParser"]CODE
LOWnltk/parse/nonprojectivedependencyparser.py26logger = logging.getLogger(__name__)CODE
LOWnltk/huggingface/__init__.py9__all__ = ["download"]CODE
Modern AI Meta-Vocabulary5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMnltk/translate/ribes_score.py218 # (an O(L^2) scan) for every context window, giving up to O(L^4) time: aCOMMENT
MEDIUMnltk/translate/ribes_score.py277 # A context window longer than the reference can never occur in itCOMMENT
MEDIUMnltk/translate/ribes_score.py286 # Retrieve the right context window.COMMENT
MEDIUMnltk/translate/ribes_score.py301 # Retrieve the left context window.COMMENT
MEDIUMnltk/tokenize/punkt.py1647 # Debug scaffold: write through pathsec to a fresh private (0700) dir underCOMMENT
AI Structural Patterns11 hits · 10 pts
SeverityFileLineSnippetContext
LOWnltk/downloader.py244CODE
LOWnltk/downloader.py1053CODE
LOWnltk/tree/prettyprinter.py331CODE
LOWnltk/metrics/agreement.py229CODE
LOWnltk/metrics/agreement.py381CODE
LOWnltk/twitter/twitterclient.py320CODE
LOWnltk/corpus/reader/conll.py67CODE
LOWnltk/tbl/demo.py143CODE
LOWnltk/sentiment/util.py327CODE
LOWnltk/tokenize/stanford_segmenter.py94CODE
LOWnltk/tokenize/texttiling.py67CODE
Fake / Example Data5 hits · 4 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
LOWnltk/test/unit/test_quadratic_dos.py176 "555-1234",CODE
LOWnltk/test/unit/test_tokenize.py1324 == "Lorem ipsum dolor sit amet. consectetur adipiscing elit."CODE
LOWnltk/test/unit/test_tokenize.py1324 == "Lorem ipsum dolor sit amet. consectetur adipiscing elit."CODE
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