AI Slop Code RIsk Monitor

nltk/nltk

NLTK Source

37.0 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for nltk/nltk, a Python project with 14,737 GitHub stars. SynthScan examined 257,721 lines of code across 734 source files, recording 6807 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 37.0 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

37.0
Adjusted Signal
37.0
Raw Pattern Score
100%
Time Factor
2026-10-07
Last Push
14.7K
Stars
Python
Language
257.7K
Lines of Code
734
Files
6.8K
Pattern Hits
2026-10-12
Scan Date
0.41
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 59.5/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 4869 finding(s).

Hallucinated Dependency & Supply Chain Risk 14.2/100 · LOW

Are imports declared and package/API names verified? 733 finding(s).

Agent Over-Engineering Ratio 78.0/100 · CRITICAL

Are wrappers, guards, and repeated structures necessary? 5314 finding(s).

PR Review Velocity Impact 85.5/100 · CRITICAL

Which changes need focused human review? 6807 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 301MEDIUM 827LOW 5679

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 6807 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers4098 hits · 3736 pts
SeverityFileLineSnippetContext
LOWnltk/internals.py1049def _reject_cwd_relative_bare_match(filename, matches, kind):CODE
LOWnltk/tgrep.py301def _tgrep_node_literal_value(node):CODE
LOWnltk/tgrep.py398def _tgrep_nltk_tree_pos_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py645def _tgrep_conjunction_action(_s, _l, tokens, join_char="&"):CODE
LOWnltk/tgrep.py680def _tgrep_segmented_pattern_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py722def _tgrep_node_label_use_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py741def _tgrep_node_label_pred_use_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py770def _tgrep_bind_node_label_action(_s, _l, tokens):CODE
LOWnltk/tgrep.py809def _tgrep_rel_disjunction_action(_s, _l, tokens):CODE
LOW⚡nltk/downloader.py2115 def _simple_interactive_download(self, args):CODE
LOWnltk/downloader.py2145 def _simple_interactive_update(self):CODE
LOWnltk/downloader.py2199 def _simple_interactive_config(self):CODE
LOWnltk/util.py397def unweighted_minimum_spanning_digraph(tree, children=iter, shapes=None, attr=None):CODE
LOWnltk/util.py565def acyclic_branches_depth_first(CODE
LOWnltk/util.py702def unweighted_minimum_spanning_dict(tree, children=iter):CODE
LOWnltk/util.py747def unweighted_minimum_spanning_tree(tree, children=iter):CODE
LOWnltk/pathsec.py342def resolve_trusted_executable(target):CODE
LOWnltk/pathsec.py448def untrusted_executable_reason(target):CODE
LOWnltk/pathsec.py479def _resolve_trusted_nonposix(target, why=None):CODE
LOWnltk/pathsec.py917def _reject_colliding_members(members, context="zip member"):CODE
LOWnltk/pathsec.py1152def _reject_aliased_or_special(text, context, check_links=False):CODE
LOWnltk/pathsec.py1817def _resolve_and_validate_host(host, port):CODE
LOWnltk/pathsec.py1931def _reject_unpinnable_proxied_fetch(url_str):CODE
LOWnltk/pathsec.py2097def _reject_link_or_special_by_name(raw_path, context):CODE
LOWnltk/grammar.py727 def is_flexible_chomsky_normal_form(self):CODE
LOWnltk/grammar.py1532def _read_dependency_production(s):CODE
LOWnltk/picklesec.py41def _reject_extension_opcodes(pickle_source: Any) -> None:CODE
LOWnltk/picklesec.py646def _validate_allowlist_entry(module: str, name: str) -> None:CODE
LOWnltk/picklesec.py695def _validate_caller_allowlists(CODE
LOWnltk/featstruct.py1706def _apply_forwards_to_bindings(forward, bindings):CODE
LOWnltk/data.py78def _assert_no_encoded_bypass(name, error_label=None):CODE
LOWnltk/data.py192def _assert_no_normalized_bypass(name, error_label=None):CODE
LOWnltk/data.py233def _reject_unsafe_no_protocol(resource_url):CODE
LOWnltk/data.py349def _staging_dir_is_still_safe(path):CODE
LOWnltk/data.py474 def _nltk_wrap_secure_fileobj(cls, filename, fileobj):CODE
LOWnltk/data.py1031def _check_decompression_bomb(info):CODE
LOWnltk/data.py1073def _reject_decompression_total(total, compress_size, name, kind):CODE
LOWnltk/decorators.py172def _call_arguments_from_signature(signature):CODE
LOWnltk/tree/tree.py434 def treeposition_spanning_leaves(self, start, end):CODE
LOWnltk/metrics/paice.py29def get_words_from_dictionary(lemmas):CODE
LOWnltk/metrics/paice.py297 def _get_truncation_coordinates(self, cutlength=0):CODE
LOWnltk/metrics/agreement.py263 def _chance_corrected_agreement(self, observed, expected):CODE
LOWnltk/metrics/distance.py42def _check_distance_input_len(s1, s2, func_name):CODE
LOWnltk/app/concordance_app.py323 def search_enter_keypress_handler(self, *event):CODE
LOWnltk/app/concordance_app.py430 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.py2593 def bottom_up_leftcorner_strategy(self, *e):CODE
LOWnltk/app/collocations_app.py260 def handle_error_loading_corpus(self, event):CODE
LOWnltk/app/wordnet_app.py220def get_unique_counter_from_url(sp):CODE
LOWnltk/app/wordnet_app.py962def get_static_welcome_message():STRING
LOWnltk/classify/util.py172def binary_names_demo_features(name):CODE
LOW⚡nltk/classify/maxent.py1130def calculate_empirical_fcount(train_toks, encoding):CODE
LOW⚡nltk/classify/maxent.py1140def calculate_estimated_fcount(classifier, train_toks, encoding):CODE
LOWnltk/classify/maxent.py212 def most_informative_features(self, n=10):CODE
LOWnltk/classify/maxent.py226 def show_most_informative_features(self, n=10, show="all"):CODE
LOWnltk/classify/maxent.py1034def train_maxent_classifier_with_gis(CODE
LOWnltk/classify/maxent.py1158def train_maxent_classifier_with_iis(CODE
LOWnltk/classify/maxent.py1411def train_maxent_classifier_with_megam(STRING
4038 more matches not shown…
Decorative Section Separators671 hits · 2438 pts
SeverityFileLineSnippetContext
MEDIUMnltk/langnames.py132# =======================================================================COMMENT
MEDIUMnltk/langnames.py258# ======================================================================COMMENT
MEDIUMnltk/downloader.py70# ----------------------------------------------------------------------COMMENT
MEDIUMnltk/downloader.py1478 # ---------------------------------------------------COMMENT
MEDIUMnltk/downloader.py3460 # -----------------------------------------------------------COMMENT
MEDIUMnltk/util.py483# ==========================================================================COMMENT
MEDIUMnltk/util.py699# ==========================================================================COMMENT
MEDIUMnltk/redos.py338# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/redos.py343# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py122# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/tabdata.py124# ---------------------------------------------------------------------------COMMENT
MEDIUMnltk/data.py630 # ----------------------------------------------------------------------STRING
MEDIUMnltk/data.py632 # ----------------------------------------------------------------------STRING
MEDIUMnltk/chunk/named_entity.py329# ======================================================================================COMMENT
MEDIUMnltk/chunk/named_entity.py408# ======================================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py103# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py105# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py407# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py409# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py442# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py444# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py975# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py977# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py1110# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py1112# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py1146# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_quadratic_dos.py1148# ==========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py200# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py203# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py244# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py248# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py279# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py282# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py355# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py357# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py624# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_deser_rce_expanded.py630# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py67# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py71# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py100# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py103# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py431# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py434# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py501# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py504# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py576# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_deser_rce_expanded.py579# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_warnonly_loaders_expanded.py212# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_warnonly_loaders_expanded.py214# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_warnonly_loaders_expanded.py256# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_warnonly_loaders_expanded.py258# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_warnonly_loaders_expanded.py340# ===========================================================================COMMENT
MEDIUM⚡nltk/test/unit/test_attack_warnonly_loaders_expanded.py342# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_warnonly_loaders_expanded.py76# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_warnonly_loaders_expanded.py80# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_warnonly_loaders_expanded.py120# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_warnonly_loaders_expanded.py122# ===========================================================================COMMENT
MEDIUMnltk/test/unit/test_attack_warnonly_loaders_expanded.py406# ===========================================================================COMMENT
611 more matches not shown…
Empty Error Handlers200 hits · 1000 pts
SeverityFileLineSnippetContext
HIGHtools/check_unsafe_print.py258except (tokenize.TokenError, SyntaxError):CODE
HIGHtools/huggingface/push_stopwords.py199except Exception:CODE
HIGHnltk/internals.py323except Exception:CODE
HIGHnltk/downloader.py334except (_StopScan, expat.ExpatError):CODE
HIGHnltk/downloader.py789except FileExistsError:CODE
HIGHnltk/downloader.py3799except ValueError:CODE
HIGHnltk/downloader.py1201except FileNotFoundError:CODE
HIGHnltk/downloader.py1203except OSError:CODE
HIGHnltk/downloader.py1247except OSError:CODE
HIGHnltk/downloader.py1253except OSError:CODE
HIGHnltk/downloader.py1232except OSError:CODE
HIGHnltk/downloader.py1243except OSError:CODE
HIGHnltk/toolbox.py526except KeyError:CODE
HIGHnltk/toolbox.py150except AttributeError:CODE
HIGHnltk/util.py802except AttributeError:CODE
HIGHnltk/util.py806except (AttributeError, IndexError):CODE
HIGHnltk/util.py810except (AttributeError, IndexError):CODE
HIGHnltk/util.py558except TypeError:CODE
HIGHnltk/util.py644except TypeError:CODE
HIGHnltk/util.py694except TypeError:CODE
HIGHnltk/util.py824except (UnicodeError, LookupError):CODE
HIGHnltk/util.py1187except StopIteration:CODE
HIGHnltk/util.py303except TypeError:CODE
HIGHnltk/util.py350except TypeError:CODE
HIGHnltk/util.py479except TypeError:CODE
HIGHnltk/pathsec.py685except (OSError, ValueError, RuntimeError):CODE
HIGHnltk/pathsec.py859except (OSError, ValueError):CODE
HIGHnltk/pathsec.py2474except FileExistsError:CODE
HIGHnltk/pathsec.py2531except OSError:CODE
HIGHnltk/xmlsec.py303except expat.ExpatError:CODE
HIGHnltk/__init__.py120except ImportError:CODE
HIGHnltk/__init__.py186except ImportError:CODE
HIGHnltk/collections.py611except StopIteration:CODE
HIGHnltk/collections.py453except IndexError:CODE
HIGHnltk/data.py1518except ImportError:CODE
HIGHnltk/data.py1934except TypeError:CODE
HIGHnltk/metrics/spearman.py23except KeyError:CODE
HIGHnltk/metrics/spearman.py64except TypeError:CODE
HIGHnltk/metrics/segmentation.py45except ImportError:CODE
HIGHnltk/cluster/util.py14except ImportError:CODE
HIGHnltk/cluster/gaac.py10except ImportError:CODE
HIGHnltk/cluster/em.py10except ImportError:CODE
HIGHnltk/cluster/kmeans.py14except ImportError:CODE
HIGHnltk/app/concordance_app.py417except q.Empty:CODE
HIGHnltk/app/chartparser_app.py248except Exception:CODE
HIGHnltk/app/chartparser_app.py592except Exception:CODE
HIGHnltk/app/chartparser_app.py682except Exception:CODE
HIGHnltk/app/chartparser_app.py312except KeyError:CODE
HIGHnltk/app/chartparser_app.py1786except KeyError:CODE
HIGHnltk/app/collocations_app.py251except q.Empty:CODE
HIGHnltk/app/nemo_app.py99except Exception:CODE
HIGHnltk/app/wordnet_app.py302except KeyboardInterrupt:CODE
HIGHnltk/app/wordnet_app.py881except KeyError:CODE
HIGHnltk/classify/util.py225except NotImplementedError:CODE
HIGHnltk/classify/util.py281except NotImplementedError:CODE
HIGHnltk/classify/util.py330except NotImplementedError:CODE
HIGHnltk/classify/maxent.py57except ImportError:CODE
HIGHnltk/classify/scikitlearn.py41except ImportError:CODE
HIGHnltk/classify/tadm.py18except ImportError:CODE
HIGHnltk/chunk/named_entity.py25except ImportError:CODE
140 more matches not shown…
Unused Imports696 hits · 606 pts
SeverityFileLineSnippetContext
LOWtools/find_deprecated.py30CODE
LOWnltk/internals.py25CODE
LOWnltk/toolbox.py13CODE
LOWnltk/util.py32CODE
LOWnltk/util.py33CODE
LOWnltk/util.py33CODE
LOWnltk/__init__.py23CODE
LOWnltk/__init__.py115CODE
LOWnltk/__init__.py145CODE
LOWnltk/__init__.py146CODE
LOWnltk/__init__.py146CODE
LOWnltk/__init__.py147CODE
LOWnltk/__init__.py148CODE
LOWnltk/__init__.py149CODE
LOWnltk/__init__.py150CODE
LOWnltk/__init__.py151CODE
LOWnltk/__init__.py152CODE
LOWnltk/__init__.py158CODE
LOWnltk/__init__.py159CODE
LOWnltk/__init__.py160CODE
LOWnltk/__init__.py161CODE
LOWnltk/__init__.py162CODE
LOWnltk/__init__.py163CODE
LOWnltk/__init__.py164CODE
LOWnltk/__init__.py165CODE
LOWnltk/__init__.py166CODE
LOWnltk/__init__.py167CODE
LOWnltk/__init__.py168CODE
LOWnltk/__init__.py191CODE
LOWnltk/__init__.py191CODE
LOWnltk/__init__.py211CODE
LOWnltk/__init__.py211CODE
LOWnltk/__init__.py211CODE
LOWnltk/__init__.py211CODE
LOWnltk/__init__.py212CODE
LOWnltk/__init__.py212CODE
LOWnltk/__init__.py212CODE
LOWnltk/__init__.py212CODE
LOWnltk/__init__.py212CODE
LOWnltk/__init__.py212CODE
LOWnltk/__init__.py213CODE
LOWnltk/__init__.py213CODE
LOWnltk/__init__.py213CODE
LOWnltk/__init__.py213CODE
LOWnltk/__init__.py213CODE
LOWnltk/__init__.py213CODE
LOWnltk/__init__.py214CODE
LOWnltk/__init__.py214CODE
LOWnltk/__init__.py214CODE
LOWnltk/__init__.py214CODE
LOWnltk/__init__.py214CODE
LOWnltk/__init__.py214CODE
LOWnltk/__init__.py119CODE
LOWnltk/__init__.py185CODE
LOWnltk/__init__.py189CODE
LOWnltk/__init__.py198CODE
LOWnltk/grammar.py1608CODE
LOWnltk/book.py9CODE
LOWnltk/book.py18CODE
LOWnltk/book.py21CODE
636 more matches not shown…
Deep Nesting453 hits · 402 pts
SeverityFileLineSnippetContext
LOWtools/check_no_bare_execution.py50CODE
LOWtools/check_no_bare_execution.py64CODE
LOWtools/check_reanchoring_quadratic.py303CODE
LOWtools/check_reanchoring_quadratic.py361CODE
LOWtools/check_all_pickle_through_picklesec.py120CODE
LOWtools/check_all_pickle_through_picklesec.py94CODE
LOWtools/check_all_json_through_jsontags.py152CODE
LOWtools/check_all_json_through_jsontags.py119CODE
LOWtools/find_deprecated.py116CODE
LOWtools/find_deprecated.py151CODE
LOWtools/check_unsafe_print.py119CODE
LOWtools/check_unsafe_print.py178CODE
LOWtools/check_unsafe_print.py333CODE
LOWtools/check_all_spawns_through_pathsec.py192CODE
LOWtools/check_all_spawns_through_pathsec.py288CODE
LOWtools/check_no_unsandboxed_open.py76CODE
LOWtools/check_no_unsandboxed_open.py107CODE
LOWtools/check_all_regex_through_redos.py95CODE
LOWnltk/jsontags.py91CODE
LOWnltk/jsontags.py117CODE
LOWnltk/internals.py284CODE
LOWnltk/internals.py895CODE
LOWnltk/internals.py927CODE
LOWnltk/internals.py1284CODE
LOWnltk/internals.py1698CODE
LOWnltk/tgrep.py325CODE
LOWnltk/tgrep.py414CODE
LOWnltk/downloader.py3341CODE
LOWnltk/downloader.py3734CODE
LOWnltk/downloader.py885CODE
LOWnltk/downloader.py1102CODE
LOWnltk/downloader.py1552CODE
LOWnltk/downloader.py1679CODE
LOWnltk/downloader.py1834CODE
LOWnltk/downloader.py2074CODE
LOWnltk/downloader.py2115CODE
LOWnltk/downloader.py2145CODE
LOWnltk/downloader.py2199CODE
LOWnltk/downloader.py2612CODE
LOWnltk/downloader.py2708CODE
LOWnltk/downloader.py2776CODE
LOWnltk/downloader.py2867CODE
LOWnltk/downloader.py3101CODE
LOWnltk/toolbox.py306CODE
LOWnltk/toolbox.py538CODE
LOWnltk/util.py233CODE
LOWnltk/util.py312CODE
LOWnltk/util.py354CODE
LOWnltk/util.py443CODE
LOWnltk/util.py486CODE
LOWnltk/util.py565CODE
LOWnltk/util.py651CODE
LOWnltk/util.py702CODE
LOWnltk/util.py1264CODE
LOWnltk/pathsec.py731CODE
LOWnltk/pathsec.py1525CODE
LOWnltk/pathsec.py1675CODE
LOWnltk/pathsec.py1720CODE
LOWnltk/pathsec.py1972CODE
LOWnltk/pathsec.py2401CODE
393 more matches not shown…
Cross-File Repetition70 hits · 350 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_tokenize_stanford_pathsec.py0raised by the trapped ``java`` so a test can tell "the argv was built and handed off" apart from "a guard refused first"STRING
HIGHnltk/test/unit/test_pathsec_sweep_wrappers.py0raised by the trapped ``java`` so a test can tell "the argv was built and handed off" apart from "a guard refused first"STRING
HIGHnltk/test/unit/test_malt_stanford_pathsec.py0raised by the trapped ``java`` so a test can tell "the argv was built and handed off" apart from "a guard refused first"STRING
HIGHnltk/test/unit/test_tokenize_stanford_pathsec.py0replace ``module.java`` with a trap that records argv and stops before launching a jvm.STRING
HIGHnltk/test/unit/test_pathsec_sweep_wrappers.py0replace ``module.java`` with a trap that records argv and stops before launching a jvm.STRING
HIGHnltk/test/unit/test_malt_stanford_pathsec.py0replace ``module.java`` with a trap that records argv and stops before launching a jvm.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_inference_security.py0run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the wSTRING
HIGHnltk/test/unit/test_dos_bounds_calibrated.py0s -> np vp np -> det n | det n pp vp -> v np | v np pp pp -> p np np -> 'i' n -> 'man' | 'park' | 'telescope' | 'dog' deSTRING
HIGHnltk/parse/recursivedescent.py0s -> np vp np -> det n | det n pp vp -> v np | v np pp pp -> p np np -> 'i' n -> 'man' | 'park' | 'telescope' | 'dog' deSTRING
HIGHnltk/parse/shiftreduce.py0s -> np vp np -> det n | det n pp vp -> v np | v np pp pp -> p np np -> 'i' n -> 'man' | 'park' | 'telescope' | 'dog' deSTRING
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
10 more matches not shown…
Excessive Try-Catch Wrapping224 hits · 244 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.py308 except Exception:CODE
LOWnltk/internals.py323 except Exception:CODE
LOWnltk/internals.py337 except Exception:CODE
MEDIUM⚡nltk/downloader.py2108 safe_print("Error reading from server: %s" % e)CODE
MEDIUM⚡nltk/downloader.py2110 safe_print("Error connecting to server: %s" % e.reason)CODE
MEDIUMnltk/downloader.py2227 safe_print(f"Error reading <{new_url!r}>:\n {e}")CODE
MEDIUMnltk/downloader.py1140def _within(child, root):CODE
LOWnltk/downloader.py1975 except Exception:CODE
LOWnltk/downloader.py2226 except Exception as e:CODE
LOWnltk/downloader.py2957 except Exception:CODE
LOWnltk/downloader.py3391 except Exception as e:CODE
LOWnltk/downloader.py3490 except Exception as e:CODE
LOWnltk/downloader.py3535 except Exception as e:CODE
LOWnltk/downloader.py3556 except Exception as e:CODE
LOWnltk/downloader.py3756 except Exception as e:CODE
LOWnltk/downloader.py3760 except Exception as e:CODE
LOWnltk/pathsec.py875 except Exception:CODE
LOWnltk/pathsec.py1804 except Exception:CODE
LOWnltk/picklesec.py64 except Exception:CODE
LOWnltk/featstruct.py2737 except Exception:STRING
LOWnltk/data.py176 except Exception:CODE
LOWnltk/data.py1152 except Exception as e:CODE
LOWnltk/metrics/distance.py307 except Exception:CODE
MEDIUMnltk/twitter/twitterclient.py101 safe_print(f"Error (stream will continue): {e}")CODE
MEDIUMnltk/twitter/twitterclient.py118 safe_print(f"Error (stream will continue): {e}")CODE
LOWnltk/app/concordance_app.py405 except Exception:CODE
LOWnltk/app/concordance_app.py656 except Exception as e:CODE
MEDIUMnltk/app/concordance_app.py649def run(self):CODE
LOWnltk/app/chunkparser_app.py1469 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.py1880 safe_print("Error creating Tree View")CODE
LOWnltk/app/chartparser_app.py248 except Exception:CODE
LOWnltk/app/chartparser_app.py592 except Exception:CODE
LOWnltk/app/chartparser_app.py682 except Exception:CODE
LOWnltk/app/chartparser_app.py862 except Exception as e:CODE
LOWnltk/app/chartparser_app.py873 except Exception as e:CODE
LOWnltk/app/chartparser_app.py1879 except Exception:CODE
LOWnltk/app/chartparser_app.py2305 except Exception:CODE
LOWnltk/app/chartparser_app.py2349 except Exception as e:CODE
LOWnltk/app/chartparser_app.py2365 except Exception as e:CODE
LOWnltk/app/chartparser_app.py2388 except Exception as e:CODE
LOWnltk/app/chartparser_app.py2414 except Exception as e:CODE
LOWnltk/app/collocations_app.py422 except Exception as e:CODE
MEDIUMnltk/app/collocations_app.py407def run(self):CODE
LOWnltk/app/nemo_app.py99 except Exception:STRING
LOWnltk/app/nemo_app.py121 except Exception:STRING
LOWnltk/app/wordnet_app.py771 except Exception as e:STRING
LOWnltk/classify/weka.py98 except Exception:CODE
MEDIUMnltk/classify/weka.py91def _check_weka_version(jar):CODE
LOWnltk/test/unit/test_attack_deser_rce_expanded.py488 except Exception:CODE
LOWnltk/test/unit/test_attack_warnonly_loaders_expanded.py374 except Exception: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
164 more matches not shown…
Self-Referential Comments74 hits · 184 pts
SeverityFileLineSnippetContext
MEDIUMtools/find_deprecated.py55# Define a regexp to search for deprecated definitions.COMMENT
MEDIUMnltk/downloader.py1586 # Define a helper function for displaying output:COMMENT
MEDIUMnltk/downloader.py2345 # Create the main window.COMMENT
MEDIUMnltk/downloader.py2392 # Create the top-level frame structuresCOMMENT
MEDIUMnltk/downloader.py2415 # Create the tabsCOMMENT
MEDIUMnltk/downloader.py2424 # Create the table.COMMENT
MEDIUMnltk/downloader.py2530 # Create a menu to control which columns of the table areCOMMENT
MEDIUMnltk/downloader.py2545 # Create a sort menuCOMMENT
MEDIUMnltk/downloader.py3045 # Create a new data server object for the download operation,COMMENT
MEDIUMnltk/toolbox.py357 """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.py630 # Create the model when using it the first time.COMMENT
MEDIUMnltk/probability.py1177 # Create a heldout probability distribution for each pair ofCOMMENT
MEDIUMnltk/probability.py1326# This method is problematic because the situation ``N(c+1) == 0``COMMENT
MEDIUMnltk/featstruct.py2261 # Create the new feature structureCOMMENT
MEDIUMnltk/tree/transforms.py179 # 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.py509 # Create a widget for it.COMMENT
MEDIUMnltk/app/chartparser_app.py1118 # Create the chart canvas.COMMENT
MEDIUMnltk/app/chartparser_app.py1123 # Create the sentence canvas.COMMENT
MEDIUMnltk/app/chartparser_app.py1134 # Create the tree canvas.COMMENT
MEDIUMnltk/app/chartparser_app.py1853 # Create the root window.COMMENT
MEDIUM⚡nltk/classify/util.py244 # Create a list of male names to be used as positive-labeled examples for trainingCOMMENT
MEDIUM⚡nltk/classify/util.py247 # Create a list of male and female names to be used as unlabeled examplesCOMMENT
MEDIUM⚡nltk/classify/util.py250 # 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.py236 # Create the P(label) distributionCOMMENT
MEDIUMnltk/classify/naivebayes.py239 # 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.py85 """This method is intended to be overridden for logics thatSTRING
MEDIUMnltk/sem/util.py141 # Initialize a variable assignment with parameter ``dom``COMMENT
MEDIUM⚡nltk/sem/logic.py1979 """This class represents implications"""STRING
MEDIUM⚡nltk/sem/logic.py1986 """This class represents biconditionals"""STRING
MEDIUM⚡nltk/sem/logic.py1993 """This class represents equality expressions like "(x = y)"."""STRING
MEDIUMnltk/sem/logic.py324 """This method is intended to be overridden for logics thatSTRING
MEDIUMnltk/sem/logic.py1508 """This class represents a variable to be used as a predicate or entity"""STRING
MEDIUMnltk/sem/logic.py1580 """This class represents variables that take the form of a single lowercaseSTRING
MEDIUMnltk/sem/logic.py1610 """This class represents variables that take the form of a single uppercaseSTRING
MEDIUMnltk/sem/logic.py1625 """This class represents variables that take the form of a single lowercaseSTRING
MEDIUMnltk/sem/logic.py1632 """This class represents variables that do not take the form of a singleSTRING
MEDIUMnltk/sem/logic.py1953 """This class represents conjunctions"""STRING
MEDIUMnltk/sem/logic.py1966 """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.py511 # Define a list of parsers. We'll use all parsers.COMMENT
MEDIUMnltk/parse/chart.py649 # Create the index.COMMENT
MEDIUMnltk/parse/nonprojectivedependencyparser.py521 # Create a new node v_n+1 with address = len(nodes) + 1COMMENT
MEDIUMnltk/parse/featurechart.py204 # Create the index.COMMENT
MEDIUMnltk/parse/featurechart.py288 # Create a copy of the bindings.STRING
MEDIUMnltk/parse/featurechart.py301 # Create a copy of the bindings.STRING
MEDIUMnltk/parse/earleychart.py105 # Create the index.COMMENT
MEDIUMnltk/parse/earleychart.py155 # Create the index.COMMENT
MEDIUMnltk/draw/cfg.py186 # Create the top-level window.STRING
MEDIUMnltk/draw/cfg.py249 # Create the basic Text widget & scrollbar.STRING
MEDIUMnltk/draw/cfg.py583 # Create the basic framesSTRING
14 more matches not shown…
Cross-Language Confusion31 hits · 181 pts
SeverityFileLineSnippetContext
HIGHnltk/featstruct.py536 Return True if ``self`` subsumes ``other``. I.e., return trueSTRING
HIGHnltk/featstruct.py1488 contain the unified value, the value of ``fstruct2`` is undefined,STRING
HIGHnltk/cluster/util.py157 queue.push((priority, node))CODE
HIGHnltk/app/chartparser_app.py1301 edgelen = max(edge.length(), 1)CODE
HIGH⚡nltk/classify/maxent.py1131 fcount = numpy.zeros(encoding.length(), "d")CODE
HIGH⚡nltk/classify/maxent.py1141 fcount = numpy.zeros(encoding.length(), "d")CODE
HIGHnltk/classify/maxent.py124 assert encoding.length() == len(weights)CODE
HIGHnltk/classify/maxent.py136 assert self._encoding.length() == len(new_weights)CODE
HIGHnltk/classify/maxent.py245 self._encoding.length(),CODE
HIGHnltk/classify/maxent.py1352 deltas = numpy.ones(encoding.length(), "d")STRING
HIGHnltk/classify/maxent.py1357 A = numpy.zeros((len(nfmap), encoding.length()), "d")STRING
HIGHnltk/classify/maxent.py1497 weights = parse_megam_weights(stdout, encoding.length(), explicit)STRING
HIGHnltk/classify/tadm.py141 for i in range(encoding.length()):CODE
HIGH⚡nltk/test/unit/test_attack_path_sandbox_expanded.py348 # Only char devices (/dev/null) were exercised before. A block deviceCOMMENT
HIGHnltk/test/unit/test_attack_maxent_params_expanded.py1158 assert other._encoding.length() == encoding.length()CODE
HIGHnltk/test/unit/test_corenlp_options_security.py188 ["-timeout", "15000 && curl evil"],CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py241 stack.push(_Hypothesis(0.2))CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py242 stack.push(poor_hypothesis)CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py243 stack.push(_Hypothesis(0.1))CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py244 stack.push(_Hypothesis(0.3))CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py256 stack.push(poor_hypothesis)CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py257 stack.push(worse_hypothesis)CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py258 stack.push(_Hypothesis(0.9)) # greatly superior hypothesisCODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py270 stack.push(_Hypothesis(0.9)) # greatly superior hypothesisCODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py271 stack.push(poor_hypothesis)CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py282 stack.push(_Hypothesis(0.0))CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py283 stack.push(best_hypothesis)CODE
HIGH⚡nltk/test/unit/translate/test_stack_decoder.py284 stack.push(_Hypothesis(0.5))CODE
HIGHnltk/parse/pchart.py425 queue.sort(key=lambda edge: edge.length())CODE
HIGHnltk/parse/chart.py612 :param length: Only generate edges ``e`` where ``e.length()==length``STRING
HIGHnltk/parse/chart.py898 edges = sorted((e.length(), e.start(), e) for e in self)CODE
AI Slop Vocabulary56 hits · 130 pts
SeverityFileLineSnippetContext
MEDIUMnltk/util.py263 # FIX: Use is_relative_to for robust boundary checkCOMMENT
LOWnltk/collections.py282 # 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.py1331# Simple Good-Turing. As a smoothing curve they simply use a power curve:COMMENT
MEDIUMnltk/picklesec.py403 # scipy.datasets network + cache fetchers, robust to a submodule move.COMMENT
LOWnltk/featstruct.py321 # their children a second time, so just return true.COMMENT
LOWnltk/data.py1833 # If we've cached the resource, then just return it.COMMENT
LOWnltk/data.py2434 # 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_attack_deser_rce_expanded.py1# Natural Language Toolkit: expanded deserialization / RCE attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_warnonly_loaders_expanded.py1# Natural Language Toolkit: warn-only loader + deserialization sweep attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_path_sandbox_expanded.py1# Natural Language Toolkit: expanded path-traversal / sandbox-escape attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_ssrf_expanded.py1# Natural Language Toolkit: expanded SSRF attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_twitter_expanded.py1# Natural Language Toolkit: expanded attack harness for the twitter packageCOMMENT
MEDIUMnltk/test/unit/test_attack_allowlist_payload.py1# Natural Language Toolkit: allowlist-surface attack harness for nltk.tbl.demoCOMMENT
MEDIUMnltk/test/unit/test_attack_trusted_symlink_expanded.py1# Natural Language Toolkit: trusted-spawn symlink layout harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_parse_expanded.py1# Natural Language Toolkit: expanded attack harness for the parse guardsCOMMENT
MEDIUMnltk/test/unit/test_attack_dos_expanded.py1# Natural Language Toolkit: expanded denial-of-service attack harnessCOMMENT
MEDIUMnltk/test/unit/test_termsec_exploit_harness.py1# Natural Language Toolkit: termsec sink-level exploit harnessCOMMENT
MEDIUM⚡nltk/test/unit/test_termsec_exploit_harness.py466 logger.info("%s", HOSTILE) # the harness's own control: a leakCODE
MEDIUMnltk/test/unit/test_attack_tokenize_expanded.py1# Natural Language Toolkit: expanded attack harness for the tokenizer guardsCOMMENT
MEDIUMnltk/test/unit/test_attack_translate_expanded.py1# Natural Language Toolkit: expanded attack harness for the translate guardsCOMMENT
MEDIUMnltk/test/unit/test_attack_maxent_params_expanded.py1# Natural Language Toolkit: expanded attack harness for the maxent parameter filesCOMMENT
MEDIUMnltk/test/unit/test_attack_json_loaders_expanded.py1# Natural Language Toolkit: expanded JSON deserialization attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_core_guards_expanded.py1# Natural Language Toolkit: expanded attack harness for the downloader bounds,COMMENT
MEDIUMnltk/test/unit/test_attack_tool_model_files_expanded.py1# Natural Language Toolkit: expanded attack harness for tool model filesCOMMENT
MEDIUMnltk/test/unit/test_attack_stanford_input_expanded.py1# Natural Language Toolkit: expanded attack harness for the Stanford input guardsCOMMENT
MEDIUM…est/unit/test_attack_internals_env_readstr_expanded.py1# Natural Language Toolkit: expanded attack harness for the JVM childCOMMENT
MEDIUM…tk/test/unit/test_picklesec_allowlist_consolidation.py1# Natural Language Toolkit: attack harness for the picklesec allowlist consolidationCOMMENT
MEDIUMnltk/test/unit/test_attack_relextract_expanded.py1# Natural Language Toolkit: expanded attack harness for the relation extractorCOMMENT
MEDIUM…tk/test/unit/test_attack_allowlist_callers_expanded.py1# Natural Language Toolkit: allowlist-surface attack harness for the remainingCOMMENT
MEDIUMnltk/test/unit/test_data_no_protocol_traversal.py253# Exotic URL/path normalization vectors kept in the harness so a regression thatCOMMENT
MEDIUMnltk/test/unit/test_stopwords_extended.py115 # paradigm completions (NLTK already has `should've`, `mustn't`, ...)COMMENT
LOWnltk/test/unit/test_downloader.py91 # Cannot mock a zip here as we are trying to validate file checksums, so just create a simple one with the XMLCOMMENT
MEDIUMnltk/test/unit/test_attack_corpus_readers_expanded.py1# Natural Language Toolkit: expanded attack harness for the corpus reader guardsCOMMENT
MEDIUMnltk/test/unit/test_redos_compile_dos.py1# Natural Language Toolkit: compile-time regex DoS attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_sentiment_csv_expanded.py1# Natural Language Toolkit: expanded attack harness for the sentiment sinksCOMMENT
MEDIUM…k/test/unit/test_attack_tree_prettyprinter_expanded.py1# Natural Language Toolkit: tree pretty-printer attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_xml_xss_expanded.py1# Natural Language Toolkit: expanded XML / XSS / markup-injection attack harnessCOMMENT
MEDIUMnltk/test/unit/test_termsec_security.py1# Natural Language Toolkit: terminal-control-sequence (CWE-150) attack harnessCOMMENT
MEDIUMnltk/test/unit/test_attack_ccg_expanded.py1# Natural Language Toolkit: expanded attack harness for the CCG lexicon parserCOMMENT
MEDIUMnltk/test/unit/test_attack_data_readline_expanded.py1# Natural Language Toolkit: expanded attack harness for the readline guardCOMMENT
MEDIUMnltk/test/unit/security_probes/ghsa_8mgp_746c_j5xp.py241 # its return value, so keep the harness output clean.COMMENT
LOWnltk/translate/ribes_score.py380 # To avoid this, we can just return the lowest possible score.COMMENT
MEDIUMnltk/sem/drt.py152 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/drt.py157 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/logic.py457 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/logic.py495 """This method serves as a hook for other logic parsers thatSTRING
MEDIUMnltk/sem/logic.py530 """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.py175 # File identifier: just return the xml.COMMENT
LOWnltk/corpus/reader/framenet.py1185 # as it's easier to just call frame().COMMENT
LOWnltk/corpus/reader/semcor.py200 # solution: just use the lemma name as a stringCOMMENT
LOWnltk/parse/chart.py1240 # just return (no new edges to add).STRING
LOWnltk/parse/featurechart.py378 # just return (no new edges to add).STRING
LOWnltk/parse/featurechart.py563 # already in the chart, then just return it as-is.STRING
Over-Commented Block118 hits · 108 pts
SeverityFileLineSnippetContext
LOWtools/global_replace.py1#!/usr/bin/env pythonCOMMENT
LOWtools/github_actions/third-party.sh101COMMENT
LOWnltk/internals.py41# Anything not matching is rejected to prevent argument injectionCOMMENT
LOWnltk/internals.py441 if not raw_entries:COMMENT
LOWnltk/downloader.py1121 #COMMENT
LOWnltk/pathsec.py61COMMENT
LOWnltk/pathsec.py2001COMMENT
LOWnltk/pathsec.py2261 raw_path = os.fsdecode(raw_path)COMMENT
LOWnltk/xmlsec.py141MAX_ELEMENTS = 20_000_000COMMENT
LOWnltk/termsec.py21which is why the ``%r`` print sites are already safe), while leaving ordinaryCOMMENT
LOWnltk/grammar.py1# Natural Language Toolkit: Context Free GrammarsCOMMENT
LOWnltk/text.py261#: regex across the whole corpus; a quantified token group (e.g. ``<a>+<b>``) canCOMMENT
LOWnltk/redos.py81 "finditer",COMMENT
LOWnltk/redos.py121MAX_NESTING_DEPTH = 100COMMENT
LOWnltk/probability.py1# Natural Language Toolkit: Probability and StatisticsCOMMENT
LOWnltk/probability.py1301COMMENT
LOWnltk/probability.py1321#COMMENT
LOWnltk/probability.py1341# However, they suggest that such a simple curve is probably onlyCOMMENT
LOWnltk/probability.py1661## Kneser-Ney Probability DistributionCOMMENT
LOWnltk/probability.py1681# The implementation below uses one of the techniques described in their paperCOMMENT
LOWnltk/collocations.py381 ranks_from_scores(cf.score_ngrams(compare_scorer)),COMMENT
LOWnltk/featstruct.py301 # If we define different features, we're definitely not equal.COMMENT
LOWnltk/data.py61COMMENT
LOWnltk/data.py621 _reject_unsafe_no_protocol(resource_url)COMMENT
LOWnltk/data.py921 handle.close()COMMENT
LOWnltk/decorators.py421 return dic[args]COMMENT
LOWnltk/decorators.py441## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,COMMENT
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 # Construct a value->index dictionaryCOMMENT
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.py2641 # import pstatsCOMMENT
LOWnltk/app/wordnet_app.py241 server.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.py1361COMMENT
LOWnltk/chunk/regexp.py901COMMENT
LOWnltk/test/pytest.ini1[pytest]COMMENT
LOWnltk/test/unit/test_quadratic_dos.py501 def test_low_vowel_run_is_linear_and_unbounded(self):COMMENT
LOWnltk/test/unit/test_attack_path_sandbox_expanded.py81 root_r = _resolve(root)COMMENT
LOWnltk/test/unit/test_distance.py21 @pytest.mark.parametrize(COMMENT
LOWnltk/test/unit/test_distance.py41 ("wants", "wasp", 5, (3, 3)), # Doesn't *require* substitutionsCOMMENT
LOWnltk/test/unit/test_distance.py61 #COMMENT
LOWnltk/test/unit/test_distance.py81 #COMMENT
LOWnltk/test/unit/test_attack_dos_expanded.py401COMMENT
LOW…/test/unit/test_attack_jsontags_candidates_expanded.py81def test_depth_exactly_at_limit_is_handled_per_interpreter():COMMENT
LOW…/test/unit/test_attack_jsontags_candidates_expanded.py401COMMENT
LOWnltk/test/unit/test_texttiling_security.py41COMMENT
LOWnltk/test/unit/test_full_functionality_smoke.py41COMMENT
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
58 more matches not shown…
Redundant / Tautological Comments53 hits · 76 pts
SeverityFileLineSnippetContext
LOWnltk/jsontags.py311 # Check if we have a tagged object.COMMENT
LOWnltk/internals.py713# Check if a method has been overriddenCOMMENT
LOWnltk/internals.py968 # Check if the alternative is inside a 'file' directoryCOMMENT
LOW⚡nltk/internals.py988 # Check if the environment variable contains a direct path to the binCOMMENT
LOW⚡nltk/internals.py994 # Check if the possible bin names exist inside the environment variable directoriesCOMMENT
LOW⚡nltk/internals.py1002 # Check if the alternative is inside a 'file' directoryCOMMENT
LOW⚡nltk/internals.py1005 # Check if the alternative is inside a 'bin' directoryCOMMENT
LOWnltk/downloader.py1717 # Check if the file has the correct size.COMMENT
LOWnltk/downloader.py1738 # Check if the file's checksum matches.COMMENT
LOWnltk/downloader.py1842 # Check if the index is already up-to-date. If so, do nothing. AnCOMMENT
LOWnltk/downloader.py1997 # Check if we are on GAE where we cannot write into filesystem.COMMENT
LOWnltk/downloader.py2001 # Check if we have sufficient permissions to install in aCOMMENT
LOWnltk/downloader.py3089 # Check if we've been told to kill ourselves:COMMENT
LOWnltk/util.py742 queue.append(child) # Add child to queueCODE
LOWnltk/__init__.py193# Check if tkinter exists without importing it to avoid crashes afterCOMMENT
LOWnltk/collections.py483 # Return the valueCOMMENT
LOWnltk/probability.py2500 # Print the results in a formatted table.COMMENT
LOWnltk/featstruct.py1787 # Print the result.COMMENT
LOWnltk/featstruct.py2373 # Check if it's a special feature.COMMENT
LOWnltk/featstruct.py2379 # Check if this feature has a value already.COMMENT
LOWnltk/data.py1305 # Check if the resource name includes a zipfile nameCOMMENT
LOWnltk/data.py2508 # 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.py1337 # Check if we can fit the edge in this level.COMMENT
LOWnltk/app/wordnet_app.py160 # Set type to plain to prevent XSS by printing the path as HTMLCOMMENT
LOWnltk/classify/weka.py155 # Check if something went wrong:COMMENT
LOWnltk/classify/weka.py420 # Check if the tokens are labeled or unlabeled. If unlabeled,COMMENT
LOWnltk/classify/maxent.py732 # Return the resultCOMMENT
LOWnltk/classify/megam.py106 # 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.py265 # Check if it's in the cache.COMMENT
LOWnltk/corpus/reader/util.py277 # Check if it's in the cache.COMMENT
LOWnltk/corpus/reader/wordnet.py1966 # Open the file for reading. Note that we can not re-useCOMMENT
LOWnltk/parse/pchart.py267 # Assign probabilities to the trees.COMMENT
LOWnltk/parse/chart.py695 # Add it to the list of edges.COMMENT
LOWnltk/parse/nonprojectivedependencyparser.py653 # Set roots to attemptCOMMENT
LOWnltk/parse/earleychart.py560 # Print results.COMMENT
LOWnltk/stem/porter.py737 # Print the results.COMMENT
LOWnltk/stem/lancaster.py182 # Check if a user wants to strip prefixCOMMENT
LOWnltk/stem/lancaster.py184 # Check if a user wants to use his/her own rule tuples.COMMENT
LOWnltk/inference/tableau.py144 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/inference/tableau.py167 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/inference/tableau.py190 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/inference/tableau.py204 # Check if the branch is closed. Return 'True' if it isCOMMENT
LOWnltk/tag/brill_trainer.py532 # Check if the change causes any rule at this position toSTRING
LOWnltk/tag/brill_trainer.py541 # Check if the change causes our templates to propose anySTRING
LOWnltk/tokenize/punkt.py1741 # Check if any initials or ordinals tokens that are markedCOMMENT
LOWnltk/ccg/chart.py181 # Check if the two edges are permitted to combine.COMMENT
LOWnltk/ccg/chart.py329 # Output the resulting parsesCOMMENT
LOWnltk/ccg/chart.py461 # Print the resulting category on a new line.COMMENT
Modern Structural Boilerplate39 hits · 36 pts
SeverityFileLineSnippetContext
LOWnltk/jsontags.py323__all__ = [CODE
LOWnltk/pathsec.py2563__all__ = [CODE
LOWnltk/xmlsec.py99__all__ = [CODE
LOWnltk/treeprettyprinter.py28__all__ = ["TreePrettyPrinter"]CODE
LOWnltk/termsec.py28__all__ = ["sanitize_terminal", "safe_print", "sanitize_csv_field"] # noqa: F822CODE
LOWnltk/grammar.py1763__all__ = [CODE
LOWnltk/text.py829__all__ = [CODE
LOWnltk/redos.py64__all__ = [STRING
LOWnltk/probability.py2556__all__ = [CODE
LOWnltk/treetransforms.py126__all__ = ["chomsky_normal_form", "un_chomsky_normal_form", "collapse_unary"]STRING
LOWnltk/collocations.py418__all__ = [CODE
LOWnltk/featstruct.py2800__all__ = [STRING
LOWnltk/csvsec.py38__all__ = [CODE
LOWnltk/data.py2573__all__ = [CODE
LOWnltk/decorators.py16__all__ = ["decorator", "new_wrapper", "getinfo"]CODE
LOWnltk/tree/immutable.py119__all__ = [CODE
LOWnltk/tree/transforms.py398__all__ = ["chomsky_normal_form", "un_chomsky_normal_form", "collapse_unary"]CODE
LOWnltk/tree/parented.py587__all__ = [CODE
LOWnltk/tree/tree.py1068__all__ = [STRING
LOWnltk/tree/parsing.py63__all__ = [CODE
LOWnltk/tree/__init__.py37__all__ = [CODE
LOWnltk/tree/probabilistic.py74__all__ = ["ProbabilisticTree"]CODE
LOWnltk/tree/prettyprinter.py740__all__ = ["TreePrettyPrinter"]CODE
LOWnltk/app/concordance_app.py714__all__ = ["app"]CODE
LOWnltk/app/chunkparser_app.py1506__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.py2646__all__ = ["app"]CODE
LOWnltk/app/collocations_app.py439__all__ = ["app"]CODE
LOWnltk/app/nemo_app.py169__all__ = ["app"]STRING
LOWnltk/app/wordnet_app.py1094__all__ = ["app"]STRING
LOWnltk/classify/scikitlearn.py44__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
LOW⚡nltk/parse/bllip.py83__all__ = ["BllipParser"]CODE
LOWnltk/parse/nonprojectivedependencyparser.py27logger = 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.py1649 # Debug scaffold: write through pathsec to a fresh private (0700) dir underCOMMENT
AI Structural Patterns11 hits · 10 pts
SeverityFileLineSnippetContext
LOWnltk/downloader.py458CODE
LOWnltk/downloader.py1552CODE
LOWnltk/tree/prettyprinter.py447CODE
LOWnltk/metrics/agreement.py261CODE
LOWnltk/metrics/agreement.py428CODE
LOWnltk/twitter/twitterclient.py321CODE
LOWnltk/corpus/reader/conll.py67CODE
LOWnltk/tbl/demo.py194CODE
LOWnltk/sentiment/util.py336CODE
LOWnltk/tokenize/stanford_segmenter.py109CODE
LOWnltk/tokenize/texttiling.py65CODE
Fake / Example Data6 hits · 4 pts
SeverityFileLineSnippetContext
LOWnltk/app/nemo_app.py20Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliCODE
LOWnltk/app/nemo_app.py20Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliCODE
LOW⚡nltk/test/unit/test_quadratic_dos.py456 "555-1234",CODE
LOW⚡nltk/test/unit/test_attack_redos_candidates_expanded.py436 assert redos.fullmatch(r"[0-9]{3}-[0-9]{4}", "555-1234") is not NoneSTRING
LOWnltk/test/unit/test_tokenize.py1337 == "Lorem ipsum dolor sit amet. consectetur adipiscing elit."CODE
LOWnltk/test/unit/test_tokenize.py1337 == "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.py688CODE