NLTK Source
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 4869 finding(s).
Are imports declared and package/API names verified? 733 finding(s).
Are wrappers, guards, and repeated structures necessary? 5314 finding(s).
Which changes need focused human review? 6807 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nltk/internals.py | 1049 | def _reject_cwd_relative_bare_match(filename, matches, kind): | CODE |
| LOW | nltk/tgrep.py | 301 | def _tgrep_node_literal_value(node): | CODE |
| LOW | nltk/tgrep.py | 398 | def _tgrep_nltk_tree_pos_action(_s, _l, tokens): | CODE |
| LOW | nltk/tgrep.py | 645 | def _tgrep_conjunction_action(_s, _l, tokens, join_char="&"): | CODE |
| LOW | nltk/tgrep.py | 680 | def _tgrep_segmented_pattern_action(_s, _l, tokens): | CODE |
| LOW | nltk/tgrep.py | 722 | def _tgrep_node_label_use_action(_s, _l, tokens): | CODE |
| LOW | nltk/tgrep.py | 741 | def _tgrep_node_label_pred_use_action(_s, _l, tokens): | CODE |
| LOW | nltk/tgrep.py | 770 | def _tgrep_bind_node_label_action(_s, _l, tokens): | CODE |
| LOW | nltk/tgrep.py | 809 | def _tgrep_rel_disjunction_action(_s, _l, tokens): | CODE |
| LOW⚡ | nltk/downloader.py | 2115 | def _simple_interactive_download(self, args): | CODE |
| LOW | nltk/downloader.py | 2145 | def _simple_interactive_update(self): | CODE |
| LOW | nltk/downloader.py | 2199 | def _simple_interactive_config(self): | CODE |
| LOW | nltk/util.py | 397 | def unweighted_minimum_spanning_digraph(tree, children=iter, shapes=None, attr=None): | CODE |
| LOW | nltk/util.py | 565 | def acyclic_branches_depth_first( | CODE |
| LOW | nltk/util.py | 702 | def unweighted_minimum_spanning_dict(tree, children=iter): | CODE |
| LOW | nltk/util.py | 747 | def unweighted_minimum_spanning_tree(tree, children=iter): | CODE |
| LOW | nltk/pathsec.py | 342 | def resolve_trusted_executable(target): | CODE |
| LOW | nltk/pathsec.py | 448 | def untrusted_executable_reason(target): | CODE |
| LOW | nltk/pathsec.py | 479 | def _resolve_trusted_nonposix(target, why=None): | CODE |
| LOW | nltk/pathsec.py | 917 | def _reject_colliding_members(members, context="zip member"): | CODE |
| LOW | nltk/pathsec.py | 1152 | def _reject_aliased_or_special(text, context, check_links=False): | CODE |
| LOW | nltk/pathsec.py | 1817 | def _resolve_and_validate_host(host, port): | CODE |
| LOW | nltk/pathsec.py | 1931 | def _reject_unpinnable_proxied_fetch(url_str): | CODE |
| LOW | nltk/pathsec.py | 2097 | def _reject_link_or_special_by_name(raw_path, context): | CODE |
| LOW | nltk/grammar.py | 727 | def is_flexible_chomsky_normal_form(self): | CODE |
| LOW | nltk/grammar.py | 1532 | def _read_dependency_production(s): | CODE |
| LOW | nltk/picklesec.py | 41 | def _reject_extension_opcodes(pickle_source: Any) -> None: | CODE |
| LOW | nltk/picklesec.py | 646 | def _validate_allowlist_entry(module: str, name: str) -> None: | CODE |
| LOW | nltk/picklesec.py | 695 | def _validate_caller_allowlists( | CODE |
| LOW | nltk/featstruct.py | 1706 | def _apply_forwards_to_bindings(forward, bindings): | CODE |
| LOW | nltk/data.py | 78 | def _assert_no_encoded_bypass(name, error_label=None): | CODE |
| LOW | nltk/data.py | 192 | def _assert_no_normalized_bypass(name, error_label=None): | CODE |
| LOW | nltk/data.py | 233 | def _reject_unsafe_no_protocol(resource_url): | CODE |
| LOW | nltk/data.py | 349 | def _staging_dir_is_still_safe(path): | CODE |
| LOW | nltk/data.py | 474 | def _nltk_wrap_secure_fileobj(cls, filename, fileobj): | CODE |
| LOW | nltk/data.py | 1031 | def _check_decompression_bomb(info): | CODE |
| LOW | nltk/data.py | 1073 | def _reject_decompression_total(total, compress_size, name, kind): | CODE |
| LOW | nltk/decorators.py | 172 | def _call_arguments_from_signature(signature): | CODE |
| LOW | nltk/tree/tree.py | 434 | def treeposition_spanning_leaves(self, start, end): | CODE |
| LOW | nltk/metrics/paice.py | 29 | def get_words_from_dictionary(lemmas): | CODE |
| LOW | nltk/metrics/paice.py | 297 | def _get_truncation_coordinates(self, cutlength=0): | CODE |
| LOW | nltk/metrics/agreement.py | 263 | def _chance_corrected_agreement(self, observed, expected): | CODE |
| LOW | nltk/metrics/distance.py | 42 | def _check_distance_input_len(s1, s2, func_name): | CODE |
| LOW | nltk/app/concordance_app.py | 323 | def search_enter_keypress_handler(self, *event): | CODE |
| LOW | nltk/app/concordance_app.py | 430 | def handle_error_loading_corpus(self, event): | CODE |
| LOW | nltk/app/chunkparser_app.py | 769 | def _adaptively_modify_eval_chunk(self, t): | CODE |
| LOW | nltk/app/chunkparser_app.py | 1215 | def _syntax_highlight_grammar(self, grammar): | CODE |
| LOW | nltk/app/rdparser_app.py | 986 | def _animate_match_backtrack_frame(self, frame, widget, dy): | CODE |
| LOW | nltk/app/chartparser_app.py | 2593 | def bottom_up_leftcorner_strategy(self, *e): | CODE |
| LOW | nltk/app/collocations_app.py | 260 | def handle_error_loading_corpus(self, event): | CODE |
| LOW | nltk/app/wordnet_app.py | 220 | def get_unique_counter_from_url(sp): | CODE |
| LOW | nltk/app/wordnet_app.py | 962 | def get_static_welcome_message(): | STRING |
| LOW | nltk/classify/util.py | 172 | def binary_names_demo_features(name): | CODE |
| LOW⚡ | nltk/classify/maxent.py | 1130 | def calculate_empirical_fcount(train_toks, encoding): | CODE |
| LOW⚡ | nltk/classify/maxent.py | 1140 | def calculate_estimated_fcount(classifier, train_toks, encoding): | CODE |
| LOW | nltk/classify/maxent.py | 212 | def most_informative_features(self, n=10): | CODE |
| LOW | nltk/classify/maxent.py | 226 | def show_most_informative_features(self, n=10, show="all"): | CODE |
| LOW | nltk/classify/maxent.py | 1034 | def train_maxent_classifier_with_gis( | CODE |
| LOW | nltk/classify/maxent.py | 1158 | def train_maxent_classifier_with_iis( | CODE |
| LOW | nltk/classify/maxent.py | 1411 | def train_maxent_classifier_with_megam( | STRING |
| 4038 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | nltk/langnames.py | 132 | # ======================================================================= | COMMENT |
| MEDIUM | nltk/langnames.py | 258 | # ====================================================================== | COMMENT |
| MEDIUM | nltk/downloader.py | 70 | # ---------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/downloader.py | 1478 | # --------------------------------------------------- | COMMENT |
| MEDIUM | nltk/downloader.py | 3460 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/util.py | 483 | # ========================================================================== | COMMENT |
| MEDIUM | nltk/util.py | 699 | # ========================================================================== | COMMENT |
| MEDIUM | nltk/redos.py | 338 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/redos.py | 343 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/tabdata.py | 60 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/tabdata.py | 62 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/tabdata.py | 122 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/tabdata.py | 124 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | nltk/data.py | 630 | # ---------------------------------------------------------------------- | STRING |
| MEDIUM | nltk/data.py | 632 | # ---------------------------------------------------------------------- | STRING |
| MEDIUM | nltk/chunk/named_entity.py | 329 | # ====================================================================================== | COMMENT |
| MEDIUM | nltk/chunk/named_entity.py | 408 | # ====================================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 103 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 105 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 407 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 409 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 442 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 444 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 975 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 977 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 1110 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 1112 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 1146 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_quadratic_dos.py | 1148 | # ========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 200 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 203 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 244 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 248 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 279 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 282 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 355 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 357 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 624 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_deser_rce_expanded.py | 630 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 67 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 71 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 100 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 103 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 431 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 434 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 501 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 504 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 576 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 579 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 212 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 214 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 256 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 258 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 340 | # =========================================================================== | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 342 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 76 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 80 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 120 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 122 | # =========================================================================== | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 406 | # =========================================================================== | COMMENT |
| 611 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tools/check_unsafe_print.py | 258 | except (tokenize.TokenError, SyntaxError): | CODE |
| HIGH | tools/huggingface/push_stopwords.py | 199 | except Exception: | CODE |
| HIGH | nltk/internals.py | 323 | except Exception: | CODE |
| HIGH | nltk/downloader.py | 334 | except (_StopScan, expat.ExpatError): | CODE |
| HIGH | nltk/downloader.py | 789 | except FileExistsError: | CODE |
| HIGH | nltk/downloader.py | 3799 | except ValueError: | CODE |
| HIGH | nltk/downloader.py | 1201 | except FileNotFoundError: | CODE |
| HIGH | nltk/downloader.py | 1203 | except OSError: | CODE |
| HIGH | nltk/downloader.py | 1247 | except OSError: | CODE |
| HIGH | nltk/downloader.py | 1253 | except OSError: | CODE |
| HIGH | nltk/downloader.py | 1232 | except OSError: | CODE |
| HIGH | nltk/downloader.py | 1243 | except OSError: | CODE |
| HIGH | nltk/toolbox.py | 526 | except KeyError: | CODE |
| HIGH | nltk/toolbox.py | 150 | except AttributeError: | CODE |
| HIGH | nltk/util.py | 802 | except AttributeError: | CODE |
| HIGH | nltk/util.py | 806 | except (AttributeError, IndexError): | CODE |
| HIGH | nltk/util.py | 810 | except (AttributeError, IndexError): | CODE |
| HIGH | nltk/util.py | 558 | except TypeError: | CODE |
| HIGH | nltk/util.py | 644 | except TypeError: | CODE |
| HIGH | nltk/util.py | 694 | except TypeError: | CODE |
| HIGH | nltk/util.py | 824 | except (UnicodeError, LookupError): | CODE |
| HIGH | nltk/util.py | 1187 | except StopIteration: | CODE |
| HIGH | nltk/util.py | 303 | except TypeError: | CODE |
| HIGH | nltk/util.py | 350 | except TypeError: | CODE |
| HIGH | nltk/util.py | 479 | except TypeError: | CODE |
| HIGH | nltk/pathsec.py | 685 | except (OSError, ValueError, RuntimeError): | CODE |
| HIGH | nltk/pathsec.py | 859 | except (OSError, ValueError): | CODE |
| HIGH | nltk/pathsec.py | 2474 | except FileExistsError: | CODE |
| HIGH | nltk/pathsec.py | 2531 | except OSError: | CODE |
| HIGH | nltk/xmlsec.py | 303 | except expat.ExpatError: | CODE |
| HIGH | nltk/__init__.py | 120 | except ImportError: | CODE |
| HIGH | nltk/__init__.py | 186 | except ImportError: | CODE |
| HIGH | nltk/collections.py | 611 | except StopIteration: | CODE |
| HIGH | nltk/collections.py | 453 | except IndexError: | CODE |
| HIGH | nltk/data.py | 1518 | except ImportError: | CODE |
| HIGH | nltk/data.py | 1934 | except TypeError: | CODE |
| HIGH | nltk/metrics/spearman.py | 23 | except KeyError: | CODE |
| HIGH | nltk/metrics/spearman.py | 64 | except TypeError: | CODE |
| HIGH | nltk/metrics/segmentation.py | 45 | except ImportError: | CODE |
| HIGH | nltk/cluster/util.py | 14 | except ImportError: | CODE |
| HIGH | nltk/cluster/gaac.py | 10 | except ImportError: | CODE |
| HIGH | nltk/cluster/em.py | 10 | except ImportError: | CODE |
| HIGH | nltk/cluster/kmeans.py | 14 | except ImportError: | CODE |
| HIGH | nltk/app/concordance_app.py | 417 | except q.Empty: | CODE |
| HIGH | nltk/app/chartparser_app.py | 248 | except Exception: | CODE |
| HIGH | nltk/app/chartparser_app.py | 592 | except Exception: | CODE |
| HIGH | nltk/app/chartparser_app.py | 682 | except Exception: | CODE |
| HIGH | nltk/app/chartparser_app.py | 312 | except KeyError: | CODE |
| HIGH | nltk/app/chartparser_app.py | 1786 | except KeyError: | CODE |
| HIGH | nltk/app/collocations_app.py | 251 | except q.Empty: | CODE |
| HIGH | nltk/app/nemo_app.py | 99 | except Exception: | CODE |
| HIGH | nltk/app/wordnet_app.py | 302 | except KeyboardInterrupt: | CODE |
| HIGH | nltk/app/wordnet_app.py | 881 | except KeyError: | CODE |
| HIGH | nltk/classify/util.py | 225 | except NotImplementedError: | CODE |
| HIGH | nltk/classify/util.py | 281 | except NotImplementedError: | CODE |
| HIGH | nltk/classify/util.py | 330 | except NotImplementedError: | CODE |
| HIGH | nltk/classify/maxent.py | 57 | except ImportError: | CODE |
| HIGH | nltk/classify/scikitlearn.py | 41 | except ImportError: | CODE |
| HIGH | nltk/classify/tadm.py | 18 | except ImportError: | CODE |
| HIGH | nltk/chunk/named_entity.py | 25 | except ImportError: | CODE |
| 140 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/find_deprecated.py | 30 | CODE | |
| LOW | nltk/internals.py | 25 | CODE | |
| LOW | nltk/toolbox.py | 13 | CODE | |
| LOW | nltk/util.py | 32 | CODE | |
| LOW | nltk/util.py | 33 | CODE | |
| LOW | nltk/util.py | 33 | CODE | |
| LOW | nltk/__init__.py | 23 | CODE | |
| LOW | nltk/__init__.py | 115 | CODE | |
| LOW | nltk/__init__.py | 145 | CODE | |
| LOW | nltk/__init__.py | 146 | CODE | |
| LOW | nltk/__init__.py | 146 | CODE | |
| LOW | nltk/__init__.py | 147 | CODE | |
| LOW | nltk/__init__.py | 148 | CODE | |
| LOW | nltk/__init__.py | 149 | CODE | |
| LOW | nltk/__init__.py | 150 | CODE | |
| LOW | nltk/__init__.py | 151 | CODE | |
| LOW | nltk/__init__.py | 152 | CODE | |
| LOW | nltk/__init__.py | 158 | CODE | |
| LOW | nltk/__init__.py | 159 | CODE | |
| LOW | nltk/__init__.py | 160 | CODE | |
| LOW | nltk/__init__.py | 161 | CODE | |
| LOW | nltk/__init__.py | 162 | CODE | |
| LOW | nltk/__init__.py | 163 | CODE | |
| LOW | nltk/__init__.py | 164 | CODE | |
| LOW | nltk/__init__.py | 165 | CODE | |
| LOW | nltk/__init__.py | 166 | CODE | |
| LOW | nltk/__init__.py | 167 | CODE | |
| LOW | nltk/__init__.py | 168 | CODE | |
| LOW | nltk/__init__.py | 191 | CODE | |
| LOW | nltk/__init__.py | 191 | CODE | |
| LOW | nltk/__init__.py | 211 | CODE | |
| LOW | nltk/__init__.py | 211 | CODE | |
| LOW | nltk/__init__.py | 211 | CODE | |
| LOW | nltk/__init__.py | 211 | CODE | |
| LOW | nltk/__init__.py | 212 | CODE | |
| LOW | nltk/__init__.py | 212 | CODE | |
| LOW | nltk/__init__.py | 212 | CODE | |
| LOW | nltk/__init__.py | 212 | CODE | |
| LOW | nltk/__init__.py | 212 | CODE | |
| LOW | nltk/__init__.py | 212 | CODE | |
| LOW | nltk/__init__.py | 213 | CODE | |
| LOW | nltk/__init__.py | 213 | CODE | |
| LOW | nltk/__init__.py | 213 | CODE | |
| LOW | nltk/__init__.py | 213 | CODE | |
| LOW | nltk/__init__.py | 213 | CODE | |
| LOW | nltk/__init__.py | 213 | CODE | |
| LOW | nltk/__init__.py | 214 | CODE | |
| LOW | nltk/__init__.py | 214 | CODE | |
| LOW | nltk/__init__.py | 214 | CODE | |
| LOW | nltk/__init__.py | 214 | CODE | |
| LOW | nltk/__init__.py | 214 | CODE | |
| LOW | nltk/__init__.py | 214 | CODE | |
| LOW | nltk/__init__.py | 119 | CODE | |
| LOW | nltk/__init__.py | 185 | CODE | |
| LOW | nltk/__init__.py | 189 | CODE | |
| LOW | nltk/__init__.py | 198 | CODE | |
| LOW | nltk/grammar.py | 1608 | CODE | |
| LOW | nltk/book.py | 9 | CODE | |
| LOW | nltk/book.py | 18 | CODE | |
| LOW | nltk/book.py | 21 | CODE | |
| 636 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/check_no_bare_execution.py | 50 | CODE | |
| LOW | tools/check_no_bare_execution.py | 64 | CODE | |
| LOW | tools/check_reanchoring_quadratic.py | 303 | CODE | |
| LOW | tools/check_reanchoring_quadratic.py | 361 | CODE | |
| LOW | tools/check_all_pickle_through_picklesec.py | 120 | CODE | |
| LOW | tools/check_all_pickle_through_picklesec.py | 94 | CODE | |
| LOW | tools/check_all_json_through_jsontags.py | 152 | CODE | |
| LOW | tools/check_all_json_through_jsontags.py | 119 | CODE | |
| LOW | tools/find_deprecated.py | 116 | CODE | |
| LOW | tools/find_deprecated.py | 151 | CODE | |
| LOW | tools/check_unsafe_print.py | 119 | CODE | |
| LOW | tools/check_unsafe_print.py | 178 | CODE | |
| LOW | tools/check_unsafe_print.py | 333 | CODE | |
| LOW | tools/check_all_spawns_through_pathsec.py | 192 | CODE | |
| LOW | tools/check_all_spawns_through_pathsec.py | 288 | CODE | |
| LOW | tools/check_no_unsandboxed_open.py | 76 | CODE | |
| LOW | tools/check_no_unsandboxed_open.py | 107 | CODE | |
| LOW | tools/check_all_regex_through_redos.py | 95 | CODE | |
| LOW | nltk/jsontags.py | 91 | CODE | |
| LOW | nltk/jsontags.py | 117 | CODE | |
| LOW | nltk/internals.py | 284 | CODE | |
| LOW | nltk/internals.py | 895 | CODE | |
| LOW | nltk/internals.py | 927 | CODE | |
| LOW | nltk/internals.py | 1284 | CODE | |
| LOW | nltk/internals.py | 1698 | CODE | |
| LOW | nltk/tgrep.py | 325 | CODE | |
| LOW | nltk/tgrep.py | 414 | CODE | |
| LOW | nltk/downloader.py | 3341 | CODE | |
| LOW | nltk/downloader.py | 3734 | CODE | |
| LOW | nltk/downloader.py | 885 | CODE | |
| LOW | nltk/downloader.py | 1102 | CODE | |
| LOW | nltk/downloader.py | 1552 | CODE | |
| LOW | nltk/downloader.py | 1679 | CODE | |
| LOW | nltk/downloader.py | 1834 | CODE | |
| LOW | nltk/downloader.py | 2074 | CODE | |
| LOW | nltk/downloader.py | 2115 | CODE | |
| LOW | nltk/downloader.py | 2145 | CODE | |
| LOW | nltk/downloader.py | 2199 | CODE | |
| LOW | nltk/downloader.py | 2612 | CODE | |
| LOW | nltk/downloader.py | 2708 | CODE | |
| LOW | nltk/downloader.py | 2776 | CODE | |
| LOW | nltk/downloader.py | 2867 | CODE | |
| LOW | nltk/downloader.py | 3101 | CODE | |
| LOW | nltk/toolbox.py | 306 | CODE | |
| LOW | nltk/toolbox.py | 538 | CODE | |
| LOW | nltk/util.py | 233 | CODE | |
| LOW | nltk/util.py | 312 | CODE | |
| LOW | nltk/util.py | 354 | CODE | |
| LOW | nltk/util.py | 443 | CODE | |
| LOW | nltk/util.py | 486 | CODE | |
| LOW | nltk/util.py | 565 | CODE | |
| LOW | nltk/util.py | 651 | CODE | |
| LOW | nltk/util.py | 702 | CODE | |
| LOW | nltk/util.py | 1264 | CODE | |
| LOW | nltk/pathsec.py | 731 | CODE | |
| LOW | nltk/pathsec.py | 1525 | CODE | |
| LOW | nltk/pathsec.py | 1675 | CODE | |
| LOW | nltk/pathsec.py | 1720 | CODE | |
| LOW | nltk/pathsec.py | 1972 | CODE | |
| LOW | nltk/pathsec.py | 2401 | CODE | |
| 393 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | nltk/grammar.py | 0 | s -> 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 |
| HIGH | nltk/parse/pchart.py | 0 | s -> 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 |
| HIGH | nltk/parse/viterbi.py | 0 | s -> 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 |
| HIGH | nltk/grammar.py | 0 | s -> 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] p | STRING |
| HIGH | nltk/parse/pchart.py | 0 | s -> 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] p | STRING |
| HIGH | nltk/parse/viterbi.py | 0 | s -> 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] p | STRING |
| HIGH | nltk/app/chunkparser_app.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/app/rdparser_app.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/app/srparser_app.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/app/chartparser_app.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/sem/drt_glue_demo.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/draw/tree.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/draw/util.py | 0 | enter the tkinter mainloop. this function must be called if this window is created from a non-interactive program (e.g. | STRING |
| HIGH | nltk/test/unit/test_tokenize_stanford_pathsec.py | 0 | raised by the trapped ``java`` so a test can tell "the argv was built and handed off" apart from "a guard refused first" | STRING |
| HIGH | nltk/test/unit/test_pathsec_sweep_wrappers.py | 0 | raised by the trapped ``java`` so a test can tell "the argv was built and handed off" apart from "a guard refused first" | STRING |
| HIGH | nltk/test/unit/test_malt_stanford_pathsec.py | 0 | raised by the trapped ``java`` so a test can tell "the argv was built and handed off" apart from "a guard refused first" | STRING |
| HIGH | nltk/test/unit/test_tokenize_stanford_pathsec.py | 0 | replace ``module.java`` with a trap that records argv and stops before launching a jvm. | STRING |
| HIGH | nltk/test/unit/test_pathsec_sweep_wrappers.py | 0 | replace ``module.java`` with a trap that records argv and stops before launching a jvm. | STRING |
| HIGH | nltk/test/unit/test_malt_stanford_pathsec.py | 0 | replace ``module.java`` with a trap that records argv and stops before launching a jvm. | STRING |
| HIGH | nltk/test/unit/test_pathsec_sweep_transitionparser.py | 0 | economic 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 nn | STRING |
| HIGH | nltk/test/unit/test_pickle_load_warnings.py | 0 | economic 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 nn | STRING |
| HIGH | nltk/test/unit/test_pickle_allowlist_security.py | 0 | economic 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 nn | STRING |
| HIGH | nltk/test/unit/test_reviews_security.py | 0 | run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the w | STRING |
| HIGH | nltk/test/unit/test_chunk_redos_security.py | 0 | run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the w | STRING |
| HIGH | nltk/test/unit/test_inference_security.py | 0 | run ``target(result_q, *args)`` in a separate process with a deadline. returns ``(finished, status, payload)``. if the w | STRING |
| HIGH | nltk/test/unit/test_dos_bounds_calibrated.py | 0 | s -> np vp np -> det n | det n pp vp -> v np | v np pp pp -> p np np -> 'i' n -> 'man' | 'park' | 'telescope' | 'dog' de | STRING |
| HIGH | nltk/parse/recursivedescent.py | 0 | s -> np vp np -> det n | det n pp vp -> v np | v np pp pp -> p np np -> 'i' n -> 'man' | 'park' | 'telescope' | 'dog' de | STRING |
| HIGH | nltk/parse/shiftreduce.py | 0 | s -> np vp np -> det n | det n pp vp -> v np | v np pp pp -> p np np -> 'i' n -> 'man' | 'park' | 'telescope' | 'dog' de | STRING |
| HIGH | nltk/translate/ibm2.py | 0 | probability of target sentence and an alignment given the source sentence | STRING |
| HIGH | nltk/translate/ibm3.py | 0 | probability of target sentence and an alignment given the source sentence | STRING |
| HIGH | nltk/translate/ibm4.py | 0 | probability of target sentence and an alignment given the source sentence | STRING |
| HIGH | nltk/translate/ibm5.py | 0 | probability of target sentence and an alignment given the source sentence | STRING |
| HIGH | nltk/translate/ibm1.py | 0 | probability of target sentence and an alignment given the source sentence | STRING |
| HIGH | nltk/translate/ibm2.py | 0 | data object to store counts of various parameters during training. includes counts for vacancies. | STRING |
| HIGH | nltk/translate/ibm3.py | 0 | data object to store counts of various parameters during training. includes counts for vacancies. | STRING |
| HIGH | nltk/translate/ibm4.py | 0 | data object to store counts of various parameters during training. includes counts for vacancies. | STRING |
| HIGH | nltk/translate/ibm5.py | 0 | data object to store counts of various parameters during training. includes counts for vacancies. | STRING |
| HIGH | nltk/sem/glue.py | 0 | pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of cha | STRING |
| HIGH | nltk/sem/lfg.py | 0 | pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of cha | STRING |
| HIGH | nltk/inference/mace.py | 0 | pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of cha | STRING |
| HIGH | nltk/corpus/reader/reviews.py | 0 | :param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. : | STRING |
| HIGH | nltk/corpus/reader/categorized_sents.py | 0 | :param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. : | STRING |
| HIGH | nltk/corpus/reader/comparative_sents.py | 0 | :param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. : | STRING |
| HIGH | nltk/corpus/reader/pros_cons.py | 0 | :param root: the root directory for the corpus. :param fileids: a list or regexp specifying the fileids in the corpus. : | STRING |
| HIGH | nltk/corpus/reader/reviews.py | 0 | return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or r | STRING |
| HIGH | nltk/corpus/reader/categorized_sents.py | 0 | return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or r | STRING |
| HIGH | nltk/corpus/reader/comparative_sents.py | 0 | return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or r | STRING |
| HIGH | nltk/corpus/reader/pros_cons.py | 0 | return all words and punctuation symbols in the corpus or in the specified files/categories. :param fileids: a list or r | STRING |
| HIGH | nltk/corpus/reader/aligned.py | 0 | :return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str) | STRING |
| HIGH | nltk/corpus/reader/plaintext.py | 0 | :return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str) | STRING |
| HIGH | nltk/corpus/reader/chunked.py | 0 | :return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str) | STRING |
| HIGH | nltk/corpus/reader/tagged.py | 0 | :return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str) | STRING |
| HIGH | nltk/corpus/reader/semcor.py | 0 | :return: the given file(s) as a list of words and punctuation symbols. :rtype: list(str) | STRING |
| HIGH | nltk/corpus/reader/aligned.py | 0 | :return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(li | STRING |
| HIGH | nltk/corpus/reader/plaintext.py | 0 | :return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(li | STRING |
| HIGH | nltk/corpus/reader/chunked.py | 0 | :return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(li | STRING |
| HIGH | nltk/corpus/reader/tagged.py | 0 | :return: the given file(s) as a list of sentences or utterances, each encoded as a list of word strings. :rtype: list(li | STRING |
| HIGH | nltk/corpus/reader/plaintext.py | 0 | :return: the given file(s) as a list of chapters, each encoded as a list of sentences, which are in turn encoded as list | STRING |
| HIGH | nltk/corpus/reader/chunked.py | 0 | :return: the given file(s) as a list of chapters, each encoded as a list of sentences, which are in turn encoded as list | STRING |
| HIGH | nltk/corpus/reader/tagged.py | 0 | :return: the given file(s) as a list of chapters, each encoded as a list of sentences, which are in turn encoded as list | STRING |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/global_replace.py | 38 | except Exception: | CODE |
| MEDIUM | tools/global_replace.py | 19 | def update(file, pattern, replacement): | CODE |
| LOW | tools/huggingface/push_stopwords.py | 199 | except Exception: | CODE |
| LOW | nltk/internals.py | 308 | except Exception: | CODE |
| LOW | nltk/internals.py | 323 | except Exception: | CODE |
| LOW | nltk/internals.py | 337 | except Exception: | CODE |
| MEDIUM⚡ | nltk/downloader.py | 2108 | safe_print("Error reading from server: %s" % e) | CODE |
| MEDIUM⚡ | nltk/downloader.py | 2110 | safe_print("Error connecting to server: %s" % e.reason) | CODE |
| MEDIUM | nltk/downloader.py | 2227 | safe_print(f"Error reading <{new_url!r}>:\n {e}") | CODE |
| MEDIUM | nltk/downloader.py | 1140 | def _within(child, root): | CODE |
| LOW | nltk/downloader.py | 1975 | except Exception: | CODE |
| LOW | nltk/downloader.py | 2226 | except Exception as e: | CODE |
| LOW | nltk/downloader.py | 2957 | except Exception: | CODE |
| LOW | nltk/downloader.py | 3391 | except Exception as e: | CODE |
| LOW | nltk/downloader.py | 3490 | except Exception as e: | CODE |
| LOW | nltk/downloader.py | 3535 | except Exception as e: | CODE |
| LOW | nltk/downloader.py | 3556 | except Exception as e: | CODE |
| LOW | nltk/downloader.py | 3756 | except Exception as e: | CODE |
| LOW | nltk/downloader.py | 3760 | except Exception as e: | CODE |
| LOW | nltk/pathsec.py | 875 | except Exception: | CODE |
| LOW | nltk/pathsec.py | 1804 | except Exception: | CODE |
| LOW | nltk/picklesec.py | 64 | except Exception: | CODE |
| LOW | nltk/featstruct.py | 2737 | except Exception: | STRING |
| LOW | nltk/data.py | 176 | except Exception: | CODE |
| LOW | nltk/data.py | 1152 | except Exception as e: | CODE |
| LOW | nltk/metrics/distance.py | 307 | except Exception: | CODE |
| MEDIUM | nltk/twitter/twitterclient.py | 101 | safe_print(f"Error (stream will continue): {e}") | CODE |
| MEDIUM | nltk/twitter/twitterclient.py | 118 | safe_print(f"Error (stream will continue): {e}") | CODE |
| LOW | nltk/app/concordance_app.py | 405 | except Exception: | CODE |
| LOW | nltk/app/concordance_app.py | 656 | except Exception as e: | CODE |
| MEDIUM | nltk/app/concordance_app.py | 649 | def run(self): | CODE |
| LOW | nltk/app/chunkparser_app.py | 1469 | except Exception: | CODE |
| MEDIUM | nltk/app/chunkparser_app.py | 1333 | def _chunkparse(self, words): | CODE |
| LOW | nltk/app/rdparser_app.py | 711 | except Exception: | CODE |
| LOW | nltk/app/rdparser_app.py | 725 | except Exception: | CODE |
| LOW | nltk/app/srparser_app.py | 656 | except Exception: | CODE |
| LOW | nltk/app/srparser_app.py | 671 | except Exception: | CODE |
| MEDIUM | nltk/app/chartparser_app.py | 1880 | safe_print("Error creating Tree View") | CODE |
| LOW | nltk/app/chartparser_app.py | 248 | except Exception: | CODE |
| LOW | nltk/app/chartparser_app.py | 592 | except Exception: | CODE |
| LOW | nltk/app/chartparser_app.py | 682 | except Exception: | CODE |
| LOW | nltk/app/chartparser_app.py | 862 | except Exception as e: | CODE |
| LOW | nltk/app/chartparser_app.py | 873 | except Exception as e: | CODE |
| LOW | nltk/app/chartparser_app.py | 1879 | except Exception: | CODE |
| LOW | nltk/app/chartparser_app.py | 2305 | except Exception: | CODE |
| LOW | nltk/app/chartparser_app.py | 2349 | except Exception as e: | CODE |
| LOW | nltk/app/chartparser_app.py | 2365 | except Exception as e: | CODE |
| LOW | nltk/app/chartparser_app.py | 2388 | except Exception as e: | CODE |
| LOW | nltk/app/chartparser_app.py | 2414 | except Exception as e: | CODE |
| LOW | nltk/app/collocations_app.py | 422 | except Exception as e: | CODE |
| MEDIUM | nltk/app/collocations_app.py | 407 | def run(self): | CODE |
| LOW | nltk/app/nemo_app.py | 99 | except Exception: | STRING |
| LOW | nltk/app/nemo_app.py | 121 | except Exception: | STRING |
| LOW | nltk/app/wordnet_app.py | 771 | except Exception as e: | STRING |
| LOW | nltk/classify/weka.py | 98 | except Exception: | CODE |
| MEDIUM | nltk/classify/weka.py | 91 | def _check_weka_version(jar): | CODE |
| LOW | nltk/test/unit/test_attack_deser_rce_expanded.py | 488 | except Exception: | CODE |
| LOW | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 374 | except Exception: | CODE |
| MEDIUM | nltk/test/unit/test_corpus_reader_pathsec.py | 372 | def _under_attacker_root(p): | CODE |
| LOW | nltk/test/unit/test_corpus_reader_pathsec.py | 375 | except Exception: | CODE |
| 164 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tools/find_deprecated.py | 55 | # Define a regexp to search for deprecated definitions. | COMMENT |
| MEDIUM | nltk/downloader.py | 1586 | # Define a helper function for displaying output: | COMMENT |
| MEDIUM | nltk/downloader.py | 2345 | # Create the main window. | COMMENT |
| MEDIUM | nltk/downloader.py | 2392 | # Create the top-level frame structures | COMMENT |
| MEDIUM | nltk/downloader.py | 2415 | # Create the tabs | COMMENT |
| MEDIUM | nltk/downloader.py | 2424 | # Create the table. | COMMENT |
| MEDIUM | nltk/downloader.py | 2530 | # Create a menu to control which columns of the table are | COMMENT |
| MEDIUM | nltk/downloader.py | 2545 | # Create a sort menu | COMMENT |
| MEDIUM | nltk/downloader.py | 3045 | # Create a new data server object for the download operation, | COMMENT |
| MEDIUM | nltk/toolbox.py | 357 | """This class is the base class for settings files.""" | STRING |
| MEDIUM | nltk/lazyimport.py | 1 | # This module is from mx/DateTime/LazyModule.py and is | COMMENT |
| MEDIUM | nltk/text.py | 216 | # Create the pretty lines with the query_word in the middle. | COMMENT |
| MEDIUM | nltk/text.py | 223 | # Create the ConcordanceLine | COMMENT |
| MEDIUM | nltk/text.py | 630 | # Create the model when using it the first time. | COMMENT |
| MEDIUM | nltk/probability.py | 1177 | # Create a heldout probability distribution for each pair of | COMMENT |
| MEDIUM | nltk/probability.py | 1326 | # This method is problematic because the situation ``N(c+1) == 0`` | COMMENT |
| MEDIUM | nltk/featstruct.py | 2261 | # Create the new feature structure | COMMENT |
| MEDIUM | nltk/tree/transforms.py | 179 | # This method is 7x faster which helps when parsing 40,000 sentences. | STRING |
| MEDIUM | nltk/app/rdparser_app.py | 113 | # Create the basic frames. | COMMENT |
| MEDIUM | nltk/app/srparser_app.py | 122 | # Create the basic frames. | COMMENT |
| MEDIUM | nltk/app/chartparser_app.py | 509 | # Create a widget for it. | COMMENT |
| MEDIUM | nltk/app/chartparser_app.py | 1118 | # Create the chart canvas. | COMMENT |
| MEDIUM | nltk/app/chartparser_app.py | 1123 | # Create the sentence canvas. | COMMENT |
| MEDIUM | nltk/app/chartparser_app.py | 1134 | # Create the tree canvas. | COMMENT |
| MEDIUM | nltk/app/chartparser_app.py | 1853 | # Create the root window. | COMMENT |
| MEDIUM⚡ | nltk/classify/util.py | 244 | # Create a list of male names to be used as positive-labeled examples for training | COMMENT |
| MEDIUM⚡ | nltk/classify/util.py | 247 | # Create a list of male and female names to be used as unlabeled examples | COMMENT |
| MEDIUM⚡ | nltk/classify/util.py | 250 | # Create a test set with correctly-labeled male and female names | COMMENT |
| MEDIUM | nltk/classify/__init__.py | 49 | >>> # Define a feature detector function. | STRING |
| MEDIUM | nltk/classify/positivenaivebayes.py | 142 | # Create the P(label) distribution. | COMMENT |
| MEDIUM | nltk/classify/positivenaivebayes.py | 147 | # Create the P(fval|label, fname) distribution. | COMMENT |
| MEDIUM | nltk/classify/naivebayes.py | 236 | # Create the P(label) distribution | COMMENT |
| MEDIUM | nltk/classify/naivebayes.py | 239 | # Create the P(fval|label, fname) distribution | COMMENT |
| MEDIUM | nltk/test/unit/test_corpus_reader.py | 24 | # Create a symlink inside corpus_root that points outside corpus_root | COMMENT |
| MEDIUM | nltk/sem/drt.py | 85 | """This method is intended to be overridden for logics that | STRING |
| MEDIUM | nltk/sem/util.py | 141 | # Initialize a variable assignment with parameter ``dom`` | COMMENT |
| MEDIUM⚡ | nltk/sem/logic.py | 1979 | """This class represents implications""" | STRING |
| MEDIUM⚡ | nltk/sem/logic.py | 1986 | """This class represents biconditionals""" | STRING |
| MEDIUM⚡ | nltk/sem/logic.py | 1993 | """This class represents equality expressions like "(x = y)".""" | STRING |
| MEDIUM | nltk/sem/logic.py | 324 | """This method is intended to be overridden for logics that | STRING |
| MEDIUM | nltk/sem/logic.py | 1508 | """This class represents a variable to be used as a predicate or entity""" | STRING |
| MEDIUM | nltk/sem/logic.py | 1580 | """This class represents variables that take the form of a single lowercase | STRING |
| MEDIUM | nltk/sem/logic.py | 1610 | """This class represents variables that take the form of a single uppercase | STRING |
| MEDIUM | nltk/sem/logic.py | 1625 | """This class represents variables that take the form of a single lowercase | STRING |
| MEDIUM | nltk/sem/logic.py | 1632 | """This class represents variables that do not take the form of a single | STRING |
| MEDIUM | nltk/sem/logic.py | 1953 | """This class represents conjunctions""" | STRING |
| MEDIUM | nltk/sem/logic.py | 1966 | """This class represents disjunctions""" | STRING |
| MEDIUM | nltk/sem/drt_glue_demo.py | 55 | # Create the basic frames. | COMMENT |
| MEDIUM | nltk/corpus/europarl_raw.py | 13 | # Create a new corpus reader instance for each European language | COMMENT |
| MEDIUM | nltk/parse/pchart.py | 511 | # Define a list of parsers. We'll use all parsers. | COMMENT |
| MEDIUM | nltk/parse/chart.py | 649 | # Create the index. | COMMENT |
| MEDIUM | nltk/parse/nonprojectivedependencyparser.py | 521 | # Create a new node v_n+1 with address = len(nodes) + 1 | COMMENT |
| MEDIUM | nltk/parse/featurechart.py | 204 | # Create the index. | COMMENT |
| MEDIUM | nltk/parse/featurechart.py | 288 | # Create a copy of the bindings. | STRING |
| MEDIUM | nltk/parse/featurechart.py | 301 | # Create a copy of the bindings. | STRING |
| MEDIUM | nltk/parse/earleychart.py | 105 | # Create the index. | COMMENT |
| MEDIUM | nltk/parse/earleychart.py | 155 | # Create the index. | COMMENT |
| MEDIUM | nltk/draw/cfg.py | 186 | # Create the top-level window. | STRING |
| MEDIUM | nltk/draw/cfg.py | 249 | # Create the basic Text widget & scrollbar. | STRING |
| MEDIUM | nltk/draw/cfg.py | 583 | # Create the basic frames | STRING |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | nltk/featstruct.py | 536 | Return True if ``self`` subsumes ``other``. I.e., return true | STRING |
| HIGH | nltk/featstruct.py | 1488 | contain the unified value, the value of ``fstruct2`` is undefined, | STRING |
| HIGH | nltk/cluster/util.py | 157 | queue.push((priority, node)) | CODE |
| HIGH | nltk/app/chartparser_app.py | 1301 | edgelen = max(edge.length(), 1) | CODE |
| HIGH⚡ | nltk/classify/maxent.py | 1131 | fcount = numpy.zeros(encoding.length(), "d") | CODE |
| HIGH⚡ | nltk/classify/maxent.py | 1141 | fcount = numpy.zeros(encoding.length(), "d") | CODE |
| HIGH | nltk/classify/maxent.py | 124 | assert encoding.length() == len(weights) | CODE |
| HIGH | nltk/classify/maxent.py | 136 | assert self._encoding.length() == len(new_weights) | CODE |
| HIGH | nltk/classify/maxent.py | 245 | self._encoding.length(), | CODE |
| HIGH | nltk/classify/maxent.py | 1352 | deltas = numpy.ones(encoding.length(), "d") | STRING |
| HIGH | nltk/classify/maxent.py | 1357 | A = numpy.zeros((len(nfmap), encoding.length()), "d") | STRING |
| HIGH | nltk/classify/maxent.py | 1497 | weights = parse_megam_weights(stdout, encoding.length(), explicit) | STRING |
| HIGH | nltk/classify/tadm.py | 141 | for i in range(encoding.length()): | CODE |
| HIGH⚡ | nltk/test/unit/test_attack_path_sandbox_expanded.py | 348 | # Only char devices (/dev/null) were exercised before. A block device | COMMENT |
| HIGH | nltk/test/unit/test_attack_maxent_params_expanded.py | 1158 | assert other._encoding.length() == encoding.length() | CODE |
| HIGH | nltk/test/unit/test_corenlp_options_security.py | 188 | ["-timeout", "15000 && curl evil"], | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 241 | stack.push(_Hypothesis(0.2)) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 242 | stack.push(poor_hypothesis) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 243 | stack.push(_Hypothesis(0.1)) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 244 | stack.push(_Hypothesis(0.3)) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 256 | stack.push(poor_hypothesis) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 257 | stack.push(worse_hypothesis) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 258 | stack.push(_Hypothesis(0.9)) # greatly superior hypothesis | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 270 | stack.push(_Hypothesis(0.9)) # greatly superior hypothesis | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 271 | stack.push(poor_hypothesis) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 282 | stack.push(_Hypothesis(0.0)) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 283 | stack.push(best_hypothesis) | CODE |
| HIGH⚡ | nltk/test/unit/translate/test_stack_decoder.py | 284 | stack.push(_Hypothesis(0.5)) | CODE |
| HIGH | nltk/parse/pchart.py | 425 | queue.sort(key=lambda edge: edge.length()) | CODE |
| HIGH | nltk/parse/chart.py | 612 | :param length: Only generate edges ``e`` where ``e.length()==length`` | STRING |
| HIGH | nltk/parse/chart.py | 898 | edges = sorted((e.length(), e.start(), e) for e in self) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | nltk/util.py | 263 | # FIX: Use is_relative_to for robust boundary check | COMMENT |
| LOW | nltk/collections.py | 282 | # If the slice is small enough, just use a tuple. | COMMENT |
| LOW | nltk/text.py | 123 | # nothing in common -- just return an empty freqdist. | COMMENT |
| LOW | nltk/probability.py | 1331 | # Simple Good-Turing. As a smoothing curve they simply use a power curve: | COMMENT |
| MEDIUM | nltk/picklesec.py | 403 | # scipy.datasets network + cache fetchers, robust to a submodule move. | COMMENT |
| LOW | nltk/featstruct.py | 321 | # their children a second time, so just return true. | COMMENT |
| LOW | nltk/data.py | 1833 | # If we've cached the resource, then just return it. | COMMENT |
| LOW | nltk/data.py | 2434 | # If nothing's buffered, then just return our current filepos: | COMMENT |
| LOW | nltk/app/chunkparser_app.py | 715 | # just use the old evaluation values. | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_deser_rce_expanded.py | 1 | # Natural Language Toolkit: expanded deserialization / RCE attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_warnonly_loaders_expanded.py | 1 | # Natural Language Toolkit: warn-only loader + deserialization sweep attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_path_sandbox_expanded.py | 1 | # Natural Language Toolkit: expanded path-traversal / sandbox-escape attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_ssrf_expanded.py | 1 | # Natural Language Toolkit: expanded SSRF attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_twitter_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the twitter package | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_allowlist_payload.py | 1 | # Natural Language Toolkit: allowlist-surface attack harness for nltk.tbl.demo | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_trusted_symlink_expanded.py | 1 | # Natural Language Toolkit: trusted-spawn symlink layout harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_parse_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the parse guards | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_dos_expanded.py | 1 | # Natural Language Toolkit: expanded denial-of-service attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_termsec_exploit_harness.py | 1 | # Natural Language Toolkit: termsec sink-level exploit harness | COMMENT |
| MEDIUM⚡ | nltk/test/unit/test_termsec_exploit_harness.py | 466 | logger.info("%s", HOSTILE) # the harness's own control: a leak | CODE |
| MEDIUM | nltk/test/unit/test_attack_tokenize_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the tokenizer guards | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_translate_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the translate guards | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_maxent_params_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the maxent parameter files | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_json_loaders_expanded.py | 1 | # Natural Language Toolkit: expanded JSON deserialization attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_core_guards_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the downloader bounds, | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_tool_model_files_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for tool model files | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_stanford_input_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the Stanford input guards | COMMENT |
| MEDIUM | …est/unit/test_attack_internals_env_readstr_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the JVM child | COMMENT |
| MEDIUM | …tk/test/unit/test_picklesec_allowlist_consolidation.py | 1 | # Natural Language Toolkit: attack harness for the picklesec allowlist consolidation | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_relextract_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the relation extractor | COMMENT |
| MEDIUM | …tk/test/unit/test_attack_allowlist_callers_expanded.py | 1 | # Natural Language Toolkit: allowlist-surface attack harness for the remaining | COMMENT |
| MEDIUM | nltk/test/unit/test_data_no_protocol_traversal.py | 253 | # Exotic URL/path normalization vectors kept in the harness so a regression that | COMMENT |
| MEDIUM | nltk/test/unit/test_stopwords_extended.py | 115 | # paradigm completions (NLTK already has `should've`, `mustn't`, ...) | COMMENT |
| LOW | nltk/test/unit/test_downloader.py | 91 | # Cannot mock a zip here as we are trying to validate file checksums, so just create a simple one with the XML | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_corpus_readers_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the corpus reader guards | COMMENT |
| MEDIUM | nltk/test/unit/test_redos_compile_dos.py | 1 | # Natural Language Toolkit: compile-time regex DoS attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_sentiment_csv_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the sentiment sinks | COMMENT |
| MEDIUM | …k/test/unit/test_attack_tree_prettyprinter_expanded.py | 1 | # Natural Language Toolkit: tree pretty-printer attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_xml_xss_expanded.py | 1 | # Natural Language Toolkit: expanded XML / XSS / markup-injection attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_termsec_security.py | 1 | # Natural Language Toolkit: terminal-control-sequence (CWE-150) attack harness | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_ccg_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the CCG lexicon parser | COMMENT |
| MEDIUM | nltk/test/unit/test_attack_data_readline_expanded.py | 1 | # Natural Language Toolkit: expanded attack harness for the readline guard | COMMENT |
| MEDIUM | nltk/test/unit/security_probes/ghsa_8mgp_746c_j5xp.py | 241 | # its return value, so keep the harness output clean. | COMMENT |
| LOW | nltk/translate/ribes_score.py | 380 | # To avoid this, we can just return the lowest possible score. | COMMENT |
| MEDIUM | nltk/sem/drt.py | 152 | """This method serves as a hook for other logic parsers that | STRING |
| MEDIUM | nltk/sem/drt.py | 157 | """This method serves as a hook for other logic parsers that | STRING |
| MEDIUM | nltk/sem/logic.py | 457 | """This method serves as a hook for other logic parsers that | STRING |
| MEDIUM | nltk/sem/logic.py | 495 | """This method serves as a hook for other logic parsers that | STRING |
| MEDIUM | nltk/sem/logic.py | 530 | """This method serves as a hook for other logic parsers that | STRING |
| LOW | nltk/corpus/__init__.py | 194 | # [XX] This should probably just use TaggedCorpusReader: | COMMENT |
| LOW | nltk/corpus/reader/verbnet.py | 175 | # File identifier: just return the xml. | COMMENT |
| LOW | nltk/corpus/reader/framenet.py | 1185 | # as it's easier to just call frame(). | COMMENT |
| LOW | nltk/corpus/reader/semcor.py | 200 | # solution: just use the lemma name as a string | COMMENT |
| LOW | nltk/parse/chart.py | 1240 | # just return (no new edges to add). | STRING |
| LOW | nltk/parse/featurechart.py | 378 | # just return (no new edges to add). | STRING |
| LOW | nltk/parse/featurechart.py | 563 | # already in the chart, then just return it as-is. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/global_replace.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | tools/github_actions/third-party.sh | 101 | COMMENT | |
| LOW | nltk/internals.py | 41 | # Anything not matching is rejected to prevent argument injection | COMMENT |
| LOW | nltk/internals.py | 441 | if not raw_entries: | COMMENT |
| LOW | nltk/downloader.py | 1121 | # | COMMENT |
| LOW | nltk/pathsec.py | 61 | COMMENT | |
| LOW | nltk/pathsec.py | 2001 | COMMENT | |
| LOW | nltk/pathsec.py | 2261 | raw_path = os.fsdecode(raw_path) | COMMENT |
| LOW | nltk/xmlsec.py | 141 | MAX_ELEMENTS = 20_000_000 | COMMENT |
| LOW | nltk/termsec.py | 21 | which is why the ``%r`` print sites are already safe), while leaving ordinary | COMMENT |
| LOW | nltk/grammar.py | 1 | # Natural Language Toolkit: Context Free Grammars | COMMENT |
| LOW | nltk/text.py | 261 | #: regex across the whole corpus; a quantified token group (e.g. ``<a>+<b>``) can | COMMENT |
| LOW | nltk/redos.py | 81 | "finditer", | COMMENT |
| LOW | nltk/redos.py | 121 | MAX_NESTING_DEPTH = 100 | COMMENT |
| LOW | nltk/probability.py | 1 | # Natural Language Toolkit: Probability and Statistics | COMMENT |
| LOW | nltk/probability.py | 1301 | COMMENT | |
| LOW | nltk/probability.py | 1321 | # | COMMENT |
| LOW | nltk/probability.py | 1341 | # However, they suggest that such a simple curve is probably only | COMMENT |
| LOW | nltk/probability.py | 1661 | ## Kneser-Ney Probability Distribution | COMMENT |
| LOW | nltk/probability.py | 1681 | # The implementation below uses one of the techniques described in their paper | COMMENT |
| LOW | nltk/collocations.py | 381 | ranks_from_scores(cf.score_ngrams(compare_scorer)), | COMMENT |
| LOW | nltk/featstruct.py | 301 | # If we define different features, we're definitely not equal. | COMMENT |
| LOW | nltk/data.py | 61 | COMMENT | |
| LOW | nltk/data.py | 621 | _reject_unsafe_no_protocol(resource_url) | COMMENT |
| LOW | nltk/data.py | 921 | handle.close() | COMMENT |
| LOW | nltk/decorators.py | 421 | return dic[args] | COMMENT |
| LOW | nltk/decorators.py | 441 | ## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | COMMENT |
| LOW | nltk/misc/sort.py | 1 | # Natural Language Toolkit: List Sorting | COMMENT |
| LOW | nltk/tree/immutable.py | 1 | # Natural Language Toolkit: Text Trees | COMMENT |
| LOW | nltk/tree/parented.py | 1 | # Natural Language Toolkit: Text Trees | COMMENT |
| LOW | nltk/tree/tree.py | 1 | # Natural Language Toolkit: Text Trees | COMMENT |
| LOW | nltk/tree/parsing.py | 1 | # Natural Language Toolkit: Text Trees | COMMENT |
| LOW | nltk/tree/probabilistic.py | 1 | # Natural Language Toolkit: Text Trees | COMMENT |
| LOW | nltk/metrics/confusionmatrix.py | 61 | # Construct a value->index dictionary | COMMENT |
| LOW | nltk/metrics/distance.py | 21 | COMMENT | |
| LOW | nltk/app/srparser_app.py | 821 | # Display the available productions. | COMMENT |
| LOW | nltk/app/srparser_app.py | 841 | # color='#000000', font=self._font) | COMMENT |
| LOW | nltk/app/chartparser_app.py | 2641 | # import pstats | COMMENT |
| LOW | nltk/app/wordnet_app.py | 241 | server. | COMMENT |
| LOW | nltk/classify/api.py | 161 | # strs or ints, but can be any immutable type. The set | COMMENT |
| LOW | nltk/classify/api.py | 181 | # the *i*\ th element of ``featuresets``. | COMMENT |
| LOW | nltk/classify/maxent.py | 1361 | COMMENT | |
| LOW | nltk/chunk/regexp.py | 901 | COMMENT | |
| LOW | nltk/test/pytest.ini | 1 | [pytest] | COMMENT |
| LOW | nltk/test/unit/test_quadratic_dos.py | 501 | def test_low_vowel_run_is_linear_and_unbounded(self): | COMMENT |
| LOW | nltk/test/unit/test_attack_path_sandbox_expanded.py | 81 | root_r = _resolve(root) | COMMENT |
| LOW | nltk/test/unit/test_distance.py | 21 | @pytest.mark.parametrize( | COMMENT |
| LOW | nltk/test/unit/test_distance.py | 41 | ("wants", "wasp", 5, (3, 3)), # Doesn't *require* substitutions | COMMENT |
| LOW | nltk/test/unit/test_distance.py | 61 | # | COMMENT |
| LOW | nltk/test/unit/test_distance.py | 81 | # | COMMENT |
| LOW | nltk/test/unit/test_attack_dos_expanded.py | 401 | COMMENT | |
| LOW | …/test/unit/test_attack_jsontags_candidates_expanded.py | 81 | def test_depth_exactly_at_limit_is_handled_per_interpreter(): | COMMENT |
| LOW | …/test/unit/test_attack_jsontags_candidates_expanded.py | 401 | COMMENT | |
| LOW | nltk/test/unit/test_texttiling_security.py | 41 | COMMENT | |
| LOW | nltk/test/unit/test_full_functionality_smoke.py | 41 | COMMENT | |
| LOW | nltk/test/unit/lm/test_models.py | 101 | def test_mle_bigram_entropy_perplexity_unseen(mle_bigram_model): | COMMENT |
| LOW | nltk/test/unit/lm/test_models.py | 161 | return model | COMMENT |
| LOW | nltk/test/unit/lm/test_models.py | 261 | ("d", ["c"], 2.0 / 9), | COMMENT |
| LOW | nltk/test/unit/lm/test_models.py | 321 | "word, context, expected_score", | COMMENT |
| LOW | nltk/test/unit/lm/test_models.py | 381 | # = 1 / 14 | COMMENT |
| 58 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nltk/jsontags.py | 311 | # Check if we have a tagged object. | COMMENT |
| LOW | nltk/internals.py | 713 | # Check if a method has been overridden | COMMENT |
| LOW | nltk/internals.py | 968 | # Check if the alternative is inside a 'file' directory | COMMENT |
| LOW⚡ | nltk/internals.py | 988 | # Check if the environment variable contains a direct path to the bin | COMMENT |
| LOW⚡ | nltk/internals.py | 994 | # Check if the possible bin names exist inside the environment variable directories | COMMENT |
| LOW⚡ | nltk/internals.py | 1002 | # Check if the alternative is inside a 'file' directory | COMMENT |
| LOW⚡ | nltk/internals.py | 1005 | # Check if the alternative is inside a 'bin' directory | COMMENT |
| LOW | nltk/downloader.py | 1717 | # Check if the file has the correct size. | COMMENT |
| LOW | nltk/downloader.py | 1738 | # Check if the file's checksum matches. | COMMENT |
| LOW | nltk/downloader.py | 1842 | # Check if the index is already up-to-date. If so, do nothing. An | COMMENT |
| LOW | nltk/downloader.py | 1997 | # Check if we are on GAE where we cannot write into filesystem. | COMMENT |
| LOW | nltk/downloader.py | 2001 | # Check if we have sufficient permissions to install in a | COMMENT |
| LOW | nltk/downloader.py | 3089 | # Check if we've been told to kill ourselves: | COMMENT |
| LOW | nltk/util.py | 742 | queue.append(child) # Add child to queue | CODE |
| LOW | nltk/__init__.py | 193 | # Check if tkinter exists without importing it to avoid crashes after | COMMENT |
| LOW | nltk/collections.py | 483 | # Return the value | COMMENT |
| LOW | nltk/probability.py | 2500 | # Print the results in a formatted table. | COMMENT |
| LOW | nltk/featstruct.py | 1787 | # Print the result. | COMMENT |
| LOW | nltk/featstruct.py | 2373 | # Check if it's a special feature. | COMMENT |
| LOW | nltk/featstruct.py | 2379 | # Check if this feature has a value already. | COMMENT |
| LOW | nltk/data.py | 1305 | # Check if the resource name includes a zipfile name | COMMENT |
| LOW | nltk/data.py | 2508 | # Return the result | COMMENT |
| LOW | nltk/app/chunkparser_app.py | 714 | # Check if we've seen this grammar already. If so, then | COMMENT |
| LOW | nltk/app/chunkparser_app.py | 748 | # Check if we're done | COMMENT |
| LOW | nltk/app/chunkparser_app.py | 1301 | # Display the results | COMMENT |
| LOW | nltk/app/rdparser_app.py | 644 | # Check if we just completed a parse. | COMMENT |
| LOW | nltk/app/chartparser_app.py | 1337 | # Check if we can fit the edge in this level. | COMMENT |
| LOW | nltk/app/wordnet_app.py | 160 | # Set type to plain to prevent XSS by printing the path as HTML | COMMENT |
| LOW | nltk/classify/weka.py | 155 | # Check if something went wrong: | COMMENT |
| LOW | nltk/classify/weka.py | 420 | # Check if the tokens are labeled or unlabeled. If unlabeled, | COMMENT |
| LOW | nltk/classify/maxent.py | 732 | # Return the result | COMMENT |
| LOW | nltk/classify/megam.py | 106 | # Write the file, which contains one line per instance. | COMMENT |
| LOW | nltk/translate/phrase_based.py | 71 | # Check if alignment points are consistent. | COMMENT |
| LOW | nltk/corpus/reader/util.py | 265 | # Check if it's in the cache. | COMMENT |
| LOW | nltk/corpus/reader/util.py | 277 | # Check if it's in the cache. | COMMENT |
| LOW | nltk/corpus/reader/wordnet.py | 1966 | # Open the file for reading. Note that we can not re-use | COMMENT |
| LOW | nltk/parse/pchart.py | 267 | # Assign probabilities to the trees. | COMMENT |
| LOW | nltk/parse/chart.py | 695 | # Add it to the list of edges. | COMMENT |
| LOW | nltk/parse/nonprojectivedependencyparser.py | 653 | # Set roots to attempt | COMMENT |
| LOW | nltk/parse/earleychart.py | 560 | # Print results. | COMMENT |
| LOW | nltk/stem/porter.py | 737 | # Print the results. | COMMENT |
| LOW | nltk/stem/lancaster.py | 182 | # Check if a user wants to strip prefix | COMMENT |
| LOW | nltk/stem/lancaster.py | 184 | # Check if a user wants to use his/her own rule tuples. | COMMENT |
| LOW | nltk/inference/tableau.py | 144 | # Check if the branch is closed. Return 'True' if it is | COMMENT |
| LOW | nltk/inference/tableau.py | 167 | # Check if the branch is closed. Return 'True' if it is | COMMENT |
| LOW | nltk/inference/tableau.py | 190 | # Check if the branch is closed. Return 'True' if it is | COMMENT |
| LOW | nltk/inference/tableau.py | 204 | # Check if the branch is closed. Return 'True' if it is | COMMENT |
| LOW | nltk/tag/brill_trainer.py | 532 | # Check if the change causes any rule at this position to | STRING |
| LOW | nltk/tag/brill_trainer.py | 541 | # Check if the change causes our templates to propose any | STRING |
| LOW | nltk/tokenize/punkt.py | 1741 | # Check if any initials or ordinals tokens that are marked | COMMENT |
| LOW | nltk/ccg/chart.py | 181 | # Check if the two edges are permitted to combine. | COMMENT |
| LOW | nltk/ccg/chart.py | 329 | # Output the resulting parses | COMMENT |
| LOW | nltk/ccg/chart.py | 461 | # Print the resulting category on a new line. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nltk/jsontags.py | 323 | __all__ = [ | CODE |
| LOW | nltk/pathsec.py | 2563 | __all__ = [ | CODE |
| LOW | nltk/xmlsec.py | 99 | __all__ = [ | CODE |
| LOW | nltk/treeprettyprinter.py | 28 | __all__ = ["TreePrettyPrinter"] | CODE |
| LOW | nltk/termsec.py | 28 | __all__ = ["sanitize_terminal", "safe_print", "sanitize_csv_field"] # noqa: F822 | CODE |
| LOW | nltk/grammar.py | 1763 | __all__ = [ | CODE |
| LOW | nltk/text.py | 829 | __all__ = [ | CODE |
| LOW | nltk/redos.py | 64 | __all__ = [ | STRING |
| LOW | nltk/probability.py | 2556 | __all__ = [ | CODE |
| LOW | nltk/treetransforms.py | 126 | __all__ = ["chomsky_normal_form", "un_chomsky_normal_form", "collapse_unary"] | STRING |
| LOW | nltk/collocations.py | 418 | __all__ = [ | CODE |
| LOW | nltk/featstruct.py | 2800 | __all__ = [ | STRING |
| LOW | nltk/csvsec.py | 38 | __all__ = [ | CODE |
| LOW | nltk/data.py | 2573 | __all__ = [ | CODE |
| LOW | nltk/decorators.py | 16 | __all__ = ["decorator", "new_wrapper", "getinfo"] | CODE |
| LOW | nltk/tree/immutable.py | 119 | __all__ = [ | CODE |
| LOW | nltk/tree/transforms.py | 398 | __all__ = ["chomsky_normal_form", "un_chomsky_normal_form", "collapse_unary"] | CODE |
| LOW | nltk/tree/parented.py | 587 | __all__ = [ | CODE |
| LOW | nltk/tree/tree.py | 1068 | __all__ = [ | STRING |
| LOW | nltk/tree/parsing.py | 63 | __all__ = [ | CODE |
| LOW | nltk/tree/__init__.py | 37 | __all__ = [ | CODE |
| LOW | nltk/tree/probabilistic.py | 74 | __all__ = ["ProbabilisticTree"] | CODE |
| LOW | nltk/tree/prettyprinter.py | 740 | __all__ = ["TreePrettyPrinter"] | CODE |
| LOW | nltk/app/concordance_app.py | 714 | __all__ = ["app"] | CODE |
| LOW | nltk/app/chunkparser_app.py | 1506 | __all__ = ["app"] | CODE |
| LOW | nltk/app/rdparser_app.py | 1052 | __all__ = ["app"] | CODE |
| LOW | nltk/app/srparser_app.py | 937 | __all__ = ["app"] | CODE |
| LOW | nltk/app/wordfreq_app.py | 36 | __all__ = ["app"] | CODE |
| LOW | nltk/app/chartparser_app.py | 2646 | __all__ = ["app"] | CODE |
| LOW | nltk/app/collocations_app.py | 439 | __all__ = ["app"] | CODE |
| LOW | nltk/app/nemo_app.py | 169 | __all__ = ["app"] | STRING |
| LOW | nltk/app/wordnet_app.py | 1094 | __all__ = ["app"] | STRING |
| LOW | nltk/classify/scikitlearn.py | 44 | __all__ = ["SklearnClassifier"] | CODE |
| LOW | nltk/test/unit/security_probes/__init__.py | 26 | __all__ = ["PROBES", "FIXED", "VULNERABLE", "STATIC", "BENIGN", "run"] | CODE |
| LOW | nltk/lm/__init__.py | 225 | __all__ = [ | CODE |
| LOW | nltk/corpus/reader/__init__.py | 118 | __all__ = [ | CODE |
| LOW⚡ | nltk/parse/bllip.py | 83 | __all__ = ["BllipParser"] | CODE |
| LOW | nltk/parse/nonprojectivedependencyparser.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | nltk/huggingface/__init__.py | 9 | __all__ = ["download"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | nltk/translate/ribes_score.py | 218 | # (an O(L^2) scan) for every context window, giving up to O(L^4) time: a | COMMENT |
| MEDIUM | nltk/translate/ribes_score.py | 277 | # A context window longer than the reference can never occur in it | COMMENT |
| MEDIUM | nltk/translate/ribes_score.py | 286 | # Retrieve the right context window. | COMMENT |
| MEDIUM | nltk/translate/ribes_score.py | 301 | # Retrieve the left context window. | COMMENT |
| MEDIUM | nltk/tokenize/punkt.py | 1649 | # Debug scaffold: write through pathsec to a fresh private (0700) dir under | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nltk/downloader.py | 458 | CODE | |
| LOW | nltk/downloader.py | 1552 | CODE | |
| LOW | nltk/tree/prettyprinter.py | 447 | CODE | |
| LOW | nltk/metrics/agreement.py | 261 | CODE | |
| LOW | nltk/metrics/agreement.py | 428 | CODE | |
| LOW | nltk/twitter/twitterclient.py | 321 | CODE | |
| LOW | nltk/corpus/reader/conll.py | 67 | CODE | |
| LOW | nltk/tbl/demo.py | 194 | CODE | |
| LOW | nltk/sentiment/util.py | 336 | CODE | |
| LOW | nltk/tokenize/stanford_segmenter.py | 109 | CODE | |
| LOW | nltk/tokenize/texttiling.py | 65 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nltk/app/nemo_app.py | 20 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna ali | CODE |
| LOW | nltk/app/nemo_app.py | 20 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna ali | CODE |
| LOW⚡ | nltk/test/unit/test_quadratic_dos.py | 456 | "555-1234", | CODE |
| LOW⚡ | nltk/test/unit/test_attack_redos_candidates_expanded.py | 436 | assert redos.fullmatch(r"[0-9]{3}-[0-9]{4}", "555-1234") is not None | STRING |
| LOW | nltk/test/unit/test_tokenize.py | 1337 | == "Lorem ipsum dolor sit amet. consectetur adipiscing elit." | CODE |
| LOW | nltk/test/unit/test_tokenize.py | 1337 | == "Lorem ipsum dolor sit amet. consectetur adipiscing elit." | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | nltk/app/chunkparser_app.py | 114 | #: for a list of tags you can use for colorizing. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | nltk/app/chartparser_app.py | 688 | CODE |