SYMBOL INDEX (3744 symbols across 468 files) FILE: stanza/models/charlm.py function repackage_hidden (line 24) | def repackage_hidden(h): function batchify (line 32) | def batchify(data, bsz, device): function get_batch (line 42) | def get_batch(source, i, seq_len): function load_file (line 48) | def load_file(filename, vocab, direction): function load_data (line 56) | def load_data(path, vocab, direction): function build_argparse (line 67) | def build_argparse(): function build_model_filename (line 112) | def build_model_filename(args): function parse_args (line 120) | def parse_args(args=None): function main (line 131) | def main(args=None): function evaluate_epoch (line 145) | def evaluate_epoch(args, vocab, data, model, criterion): function evaluate_and_save (line 170) | def evaluate_and_save(args, vocab, data, trainer, best_loss, model_file,... function get_current_lr (line 205) | def get_current_lr(trainer, args): function load_char_vocab (line 208) | def load_char_vocab(vocab_file): function train (line 211) | def train(args): function evaluate (line 339) | def evaluate(args): FILE: stanza/models/classifier.py class Loss (line 24) | class Loss(Enum): class DevScoring (line 30) | class DevScoring(Enum): function convert_fc_shapes (line 104) | def convert_fc_shapes(arg): function build_argparse (line 148) | def build_argparse(): function build_model_filename (line 294) | def build_model_filename(args): function parse_args (line 304) | def parse_args(args=None): function dataset_predictions (line 327) | def dataset_predictions(model, dataset): function confusion_dataset (line 347) | def confusion_dataset(predictions, dataset, labels): function score_dataset (line 366) | def score_dataset(model, dataset, label_map=None, function score_dev_set (line 420) | def score_dev_set(model, dev_set, dev_eval_scoring): function intermediate_name (line 438) | def intermediate_name(filename, epoch, dev_scoring, score): function log_param_sizes (line 445) | def log_param_sizes(model): function train_model (line 454) | def train_model(trainer, model_file, checkpoint_file, args, train_set, d... function main (line 587) | def main(args=None): FILE: stanza/models/classifiers/base_classifier.py class BaseClassifier (line 21) | class BaseClassifier(ABC, nn.Module): method extract_sentences (line 23) | def extract_sentences(self, doc): method preprocess_sentences (line 28) | def preprocess_sentences(self, sentences): method label_sentences (line 34) | def label_sentences(self, sentences, batch_size=None): FILE: stanza/models/classifiers/cnn_classifier.py class CNNClassifier (line 55) | class CNNClassifier(BaseClassifier): method __init__ (line 56) | def __init__(self, pretrain, extra_vocab, labels, method add_unsaved_module (line 283) | def add_unsaved_module(self, name, module): method is_unsaved_module (line 294) | def is_unsaved_module(self, name): method log_configuration (line 297) | def log_configuration(self): method log_norms (line 305) | def log_norms(self): method build_char_reps (line 312) | def build_char_reps(self, inputs, max_phrase_len, charlm, projection, ... method extract_bert_embeddings (line 323) | def extract_bert_embeddings(self, inputs, max_phrase_len, begin_paddin... method forward (line 341) | def forward(self, inputs): method get_params (line 516) | def get_params(self, skip_modules=True): method preprocess_data (line 541) | def preprocess_data(self, sentences): method extract_sentences (line 545) | def extract_sentences(self, doc): FILE: stanza/models/classifiers/config.py class CNNConfig (line 8) | class CNNConfig: # pylint: disable=too-many-instance-attributes, too-fe... class ConstituencyConfig (line 44) | class ConstituencyConfig: # pylint: disable=too-many-instance-attribute... FILE: stanza/models/classifiers/constituency_classifier.py class ConstituencyClassifier (line 23) | class ConstituencyClassifier(BaseClassifier): method __init__ (line 24) | def __init__(self, tree_embedding, labels, args): method is_unsaved_module (line 43) | def is_unsaved_module(self, name): method log_configuration (line 46) | def log_configuration(self): method log_norms (line 53) | def log_norms(self): method forward (line 62) | def forward(self, inputs): method get_params (line 74) | def get_params(self, skip_modules=True): method extract_sentences (line 95) | def extract_sentences(self, doc): FILE: stanza/models/classifiers/data.py class SentimentDatum (line 17) | class SentimentDatum: method __init__ (line 18) | def __init__(self, sentiment, text, constituency=None): method __eq__ (line 23) | def __eq__(self, other): method __str__ (line 30) | def __str__(self): method _asdict (line 33) | def _asdict(self): function update_text (line 39) | def update_text(sentence: List[str], wordvec_type: WVType) -> List[str]: function read_dataset (line 72) | def read_dataset(dataset, wordvec_type: WVType, min_len: int) -> List[Se... function dataset_labels (line 91) | def dataset_labels(dataset): function dataset_vocab (line 105) | def dataset_vocab(dataset): function sort_dataset_by_len (line 115) | def sort_dataset_by_len(dataset, keep_index=False): function shuffle_dataset (line 132) | def shuffle_dataset(sorted_dataset, batch_size, batch_single_item): function check_labels (line 158) | def check_labels(labels, dataset): FILE: stanza/models/classifiers/iterate_test.py function parse_args (line 27) | def parse_args(): FILE: stanza/models/classifiers/trainer.py class Trainer (line 29) | class Trainer: method __init__ (line 34) | def __init__(self, model, optimizer=None, epochs_trained=0, global_ste... method save (line 45) | def save(self, filename, epochs_trained=None, skip_modules=True, save_... method load (line 68) | def load(filename, args, foundation_cache=None, load_optimizer=False): method load_pretrain (line 210) | def load_pretrain(args, foundation_cache): method build_new_model (line 233) | def build_new_model(args, train_set): method build_optimizer (line 303) | def build_optimizer(model, args): FILE: stanza/models/classifiers/utils.py class WVType (line 14) | class WVType(Enum): class ExtraVectors (line 20) | class ExtraVectors(Enum): class ModelType (line 25) | class ModelType(Enum): function build_output_layers (line 29) | def build_output_layers(fc_input_size, fc_shapes, num_classes): FILE: stanza/models/common/beam.py function trunc_division (line 34) | def trunc_division(a, b): function trunc_division (line 37) | def trunc_division(a, b): class Beam (line 40) | class Beam(object): method __init__ (line 41) | def __init__(self, size, device=None): method get_current_state (line 59) | def get_current_state(self): method get_current_origin (line 63) | def get_current_origin(self): method advance (line 67) | def advance(self, wordLk, copy_indices=None): method sort_best (line 113) | def sort_best(self): method get_best (line 116) | def get_best(self): method get_hyp (line 121) | def get_hyp(self, k): FILE: stanza/models/common/bert_embedding.py class TextTooLongError (line 16) | class TextTooLongError(ValueError): method __init__ (line 20) | def __init__(self, length, max_len, line_num, text): function update_max_length (line 26) | def update_max_length(model_name, tokenizer): function load_tokenizer (line 37) | def load_tokenizer(model_name, tokenizer_kwargs=None, local_files_only=F... function load_bert (line 58) | def load_bert(model_name, tokenizer_kwargs=None, local_files_only=False): function tokenize_manual (line 70) | def tokenize_manual(model_name, sent, tokenizer): function filter_data (line 91) | def filter_data(model_name, data, tokenizer = None, log_level=logging.DE... function needs_length_filter (line 112) | def needs_length_filter(model_name): function cloned_feature (line 122) | def cloned_feature(feature, num_layers, detach=True): function extract_bart_word_embeddings (line 141) | def extract_bart_word_embeddings(model_name, tokenizer, model, data, dev... function extract_phobert_embeddings (line 177) | def extract_phobert_embeddings(model_name, tokenizer, model, data, devic... function fix_blank_tokens (line 273) | def fix_blank_tokens(tokenizer, data): function extract_llama_embeddings (line 296) | def extract_llama_embeddings(model_name, tokenizer, model, data, device,... function extract_xlnet_embeddings (line 338) | def extract_xlnet_embeddings(model_name, tokenizer, model, data, device,... function build_cloned_features (line 408) | def build_cloned_features(model, tokenizer, attention_tensor, id_tensor,... function convert_to_position_list (line 450) | def convert_to_position_list(sentence, offsets): function extract_base_embeddings (line 472) | def extract_base_embeddings(model_name, tokenizer, model, data, device, ... function extract_bert_embeddings (line 524) | def extract_bert_embeddings(model_name, tokenizer, model, data, device, ... FILE: stanza/models/common/biaffine.py class PairwiseBilinear (line 5) | class PairwiseBilinear(nn.Module): method __init__ (line 9) | def __init__(self, input1_size, input2_size, output_size, bias=True): method forward (line 19) | def forward(self, input1, input2): class BiaffineScorer (line 35) | class BiaffineScorer(nn.Module): method __init__ (line 36) | def __init__(self, input1_size, input2_size, output_size): method forward (line 43) | def forward(self, input1, input2): class PairwiseBiaffineScorer (line 48) | class PairwiseBiaffineScorer(nn.Module): method __init__ (line 49) | def __init__(self, input1_size, input2_size, output_size): method forward (line 56) | def forward(self, input1, input2): class DeepBiaffineScorer (line 61) | class DeepBiaffineScorer(nn.Module): method __init__ (line 62) | def __init__(self, input1_size, input2_size, hidden_size, output_size,... method forward (line 73) | def forward(self, input1, input2): FILE: stanza/models/common/char_model.py class CharacterModel (line 33) | class CharacterModel(nn.Module): method __init__ (line 34) | def __init__(self, args, vocab, pad=False, bidirectional=False, attent... method forward (line 55) | def forward(self, chars, chars_mask, word_orig_idx, sentlens, wordlens): function build_charlm_vocab (line 82) | def build_charlm_vocab(path, cutoff=0): class CharacterLanguageModel (line 121) | class CharacterLanguageModel(nn.Module): method __init__ (line 123) | def __init__(self, args, vocab, pad=False, is_forward_lm=True): method forward (line 145) | def forward(self, chars, charlens, hidden=None): method get_representation (line 158) | def get_representation(self, chars, charoffsets, charlens, char_orig_i... method per_char_representation (line 168) | def per_char_representation(self, words): method build_char_representation (line 183) | def build_char_representation(self, sentences): method hidden_dim (line 228) | def hidden_dim(self): method char_vocab (line 231) | def char_vocab(self): method train (line 234) | def train(self, mode=True): method full_state (line 245) | def full_state(self): method save (line 255) | def save(self, filename): method from_full_state (line 261) | def from_full_state(cls, state, finetune=False): method load (line 270) | def load(cls, filename, finetune=False): class CharacterLanguageModelWordAdapter (line 278) | class CharacterLanguageModelWordAdapter(nn.Module): method __init__ (line 282) | def __init__(self, charlms): method forward (line 286) | def forward(self, words, wrap=True): method hidden_dim (line 299) | def hidden_dim(self): class CharacterLanguageModelTrainer (line 302) | class CharacterLanguageModelTrainer(): method __init__ (line 303) | def __init__(self, model, params, optimizer, criterion, scheduler, epo... method save (line 312) | def save(self, filename, full=True): method from_new_model (line 328) | def from_new_model(cls, args, vocab): method load (line 339) | def load(cls, args, filename, finetune=False): FILE: stanza/models/common/chuliu_edmonds.py function tarjan (line 5) | def tarjan(tree): function process_cycle (line 125) | def process_cycle(tree, cycle, scores): function expand_contracted_tree (line 164) | def expand_contracted_tree(tree, contracted_tree, cycle_locs, noncycle_l... function prepare_scores (line 197) | def prepare_scores(scores): function chuliu_edmonds (line 206) | def chuliu_edmonds(scores): function chuliu_edmonds_one_root (line 246) | def chuliu_edmonds_one_root(scores): FILE: stanza/models/common/constant.py class UnknownLanguageError (line 9) | class UnknownLanguageError(ValueError): function langcode_to_lang (line 493) | def langcode_to_lang(lcode): function pretty_langcode_to_lang (line 501) | def pretty_langcode_to_lang(lcode): function lang_to_langcode (line 510) | def lang_to_langcode(lang): function is_right_to_left (line 525) | def is_right_to_left(lang): function treebank_to_short_name (line 534) | def treebank_to_short_name(treebank): function treebank_to_langid (line 560) | def treebank_to_langid(treebank): FILE: stanza/models/common/convert_pretrain.py function main (line 25) | def main(): FILE: stanza/models/common/count_ner_coverage.py function parse_args (line 4) | def parse_args(): function read_ner (line 14) | def read_ner(filename): function count_coverage (line 25) | def count_coverage(pretrain, words): FILE: stanza/models/common/count_pretrain_coverage.py function parse_args (line 15) | def parse_args(): FILE: stanza/models/common/crf.py class CRFLoss (line 12) | class CRFLoss(nn.Module): method __init__ (line 17) | def __init__(self, num_tag, batch_average=True): method forward (line 22) | def forward(self, inputs, masks, tag_indices): method crf_unary_score (line 46) | def crf_unary_score(self, inputs, masks, tag_indices, input_bs, input_... method crf_binary_score (line 57) | def crf_binary_score(self, inputs, masks, tag_indices, input_bs, input... method crf_log_norm (line 76) | def crf_log_norm(self, inputs, masks, tag_indices): function viterbi_decode (line 107) | def viterbi_decode(scores, transition_params): function log_sum_exp (line 132) | def log_sum_exp(value, dim=None, keepdim=False): FILE: stanza/models/common/data.py function map_to_ids (line 15) | def map_to_ids(tokens, vocab): function get_long_tensor (line 19) | def get_long_tensor(tokens_list, batch_size, pad_id=constant.PAD_ID): function get_float_tensor (line 33) | def get_float_tensor(features_list, batch_size): function sort_all (line 43) | def sort_all(batch, lens): function get_augment_ratio (line 51) | def get_augment_ratio(train_data, should_augment_predicate, can_augment_... function should_augment_nopunct_predicate (line 88) | def should_augment_nopunct_predicate(sentence): function can_augment_nopunct_predicate (line 92) | def can_augment_nopunct_predicate(sentence): function augment_punct (line 106) | def augment_punct(train_data, augment_ratio, FILE: stanza/models/common/doc.py class MWTProcessingType (line 22) | class MWTProcessingType(Enum): class DocJSONEncoder (line 59) | class DocJSONEncoder(json.JSONEncoder): method default (line 60) | def default(self, obj): class Document (line 67) | class Document(StanzaObject): method __init__ (line 71) | def __init__(self, sentences, text=None, comments=None, empty_sentence... method mark_whitespace (line 92) | def mark_whitespace(self): method lang (line 114) | def lang(self): method lang (line 119) | def lang(self, value): method text (line 124) | def text(self): method text (line 129) | def text(self, value): method sentences (line 134) | def sentences(self): method sentences (line 139) | def sentences(self, value): method num_tokens (line 144) | def num_tokens(self): method num_tokens (line 149) | def num_tokens(self, value): method num_words (line 154) | def num_words(self): method num_words (line 159) | def num_words(self, value): method ents (line 164) | def ents(self): method ents (line 169) | def ents(self, value): method entities (line 174) | def entities(self): method entities (line 179) | def entities(self, value): method _process_sentences (line 183) | def _process_sentences(self, sentences, comments=None, empty_sentences... method _count_words (line 242) | def _count_words(self): method get (line 249) | def get(self, fields, as_sentences=False, from_token=False): method set (line 289) | def set(self, fields, contents, to_token=False, to_sentence=False): method set_mwt_expansions (line 336) | def set_mwt_expansions(self, expansions, method get_mwt_expansions (line 432) | def get_mwt_expansions(self, evaluation=False): method build_ents (line 451) | def build_ents(self): method sort_features (line 459) | def sort_features(self): method iter_words (line 469) | def iter_words(self): method iter_tokens (line 474) | def iter_tokens(self): method sentence_comments (line 479) | def sentence_comments(self): method coref (line 484) | def coref(self): method coref (line 491) | def coref(self, chains): method _attach_coref_mentions (line 496) | def _attach_coref_mentions(self, chains): method reindex_sentences (line 515) | def reindex_sentences(self, start_index): method to_dict (line 519) | def to_dict(self): method __repr__ (line 524) | def __repr__(self): method __format__ (line 527) | def __format__(self, spec): method to_serialized (line 534) | def to_serialized(self): method from_serialized (line 540) | def from_serialized(cls, serialized_string): class Sentence (line 555) | class Sentence(StanzaObject): method __init__ (line 559) | def __init__(self, tokens, doc=None, empty_words=None): method _process_tokens (line 587) | def _process_tokens(self, tokens): method has_enhanced_dependencies (line 624) | def has_enhanced_dependencies(self): method enhanced_dependencies (line 631) | def enhanced_dependencies(self): method index (line 644) | def index(self): method index (line 654) | def index(self, value): method id (line 659) | def id(self): method id (line 670) | def id(self, value): method sent_id (line 676) | def sent_id(self): method sent_id (line 681) | def sent_id(self, value): method speaker (line 693) | def speaker(self): method speaker (line 698) | def speaker(self, value): method doc_id (line 716) | def doc_id(self): method doc_id (line 721) | def doc_id(self, value): method doc (line 733) | def doc(self): method doc (line 738) | def doc(self, value): method text (line 743) | def text(self): method text (line 748) | def text(self, value): method dependencies (line 753) | def dependencies(self): method dependencies (line 758) | def dependencies(self, value): method tokens (line 763) | def tokens(self): method tokens (line 768) | def tokens(self, value): method words (line 773) | def words(self): method words (line 778) | def words(self, value): method empty_words (line 783) | def empty_words(self): method empty_words (line 788) | def empty_words(self, value): method all_words (line 793) | def all_words(self): method ents (line 804) | def ents(self): method ents (line 809) | def ents(self, value): method entities (line 814) | def entities(self): method entities (line 819) | def entities(self, value): method build_ents (line 823) | def build_ents(self): method sentiment (line 838) | def sentiment(self): method sentiment (line 843) | def sentiment(self, value): method constituency (line 855) | def constituency(self): method constituency (line 860) | def constituency(self, value): method comments (line 879) | def comments(self): method add_comment (line 883) | def add_comment(self, comment): method rebuild_dependencies (line 914) | def rebuild_dependencies(self): method build_dependencies (line 920) | def build_dependencies(self): method build_fake_dependencies (line 940) | def build_fake_dependencies(self): method print_dependencies (line 948) | def print_dependencies(self, file=None): method dependencies_string (line 953) | def dependencies_string(self): method get_roots (line 959) | def get_roots(self): method print_tokens (line 967) | def print_tokens(self, file=None): method tokens_string (line 972) | def tokens_string(self): method print_words (line 978) | def print_words(self, file=None): method words_string (line 983) | def words_string(self): method to_dict (line 989) | def to_dict(self): method __repr__ (line 1003) | def __repr__(self): method __format__ (line 1006) | def __format__(self, spec): function init_from_misc (line 1035) | def init_from_misc(unit): function dict_to_conll_text (line 1062) | def dict_to_conll_text(token_dict, id_connector="-"): class Token (line 1122) | class Token(StanzaObject): method __init__ (line 1128) | def __init__(self, sentence, token_entry, words=None): method id (line 1155) | def id(self): method id (line 1160) | def id(self, value): method manual_expansion (line 1165) | def manual_expansion(self): method manual_expansion (line 1170) | def manual_expansion(self, value): method text (line 1175) | def text(self): method text (line 1180) | def text(self, value): method misc (line 1185) | def misc(self): method misc (line 1190) | def misc(self, value): method consolidate_whitespace (line 1194) | def consolidate_whitespace(self): method spaces_before (line 1248) | def spaces_before(self): method spaces_before (line 1253) | def spaces_before(self, value): method spaces_after (line 1257) | def spaces_after(self): method spaces_after (line 1262) | def spaces_after(self, value): method words (line 1266) | def words(self): method words (line 1271) | def words(self, value): method line_number (line 1278) | def line_number(self): method start_char (line 1283) | def start_char(self): method end_char (line 1288) | def end_char(self): method ner (line 1293) | def ner(self): method ner (line 1298) | def ner(self, value): method multi_ner (line 1303) | def multi_ner(self): method multi_ner (line 1308) | def multi_ner(self, value): method sent (line 1313) | def sent(self): method sent (line 1318) | def sent(self, value): method __repr__ (line 1322) | def __repr__(self): method __format__ (line 1325) | def __format__(self, spec): method to_conll_text (line 1333) | def to_conll_text(self, fields=DEFAULT_OUTPUT_FIELDS): method to_dict (line 1336) | def to_dict(self, fields=DEFAULT_OUTPUT_FIELDS): method pretty_print (line 1389) | def pretty_print(self): method _is_null (line 1393) | def _is_null(self, value): method is_mwt (line 1396) | def is_mwt(self): class Word (line 1399) | class Word(StanzaObject): method __init__ (line 1403) | def __init__(self, sentence, word_entry): method manual_expansion (line 1437) | def manual_expansion(self): method manual_expansion (line 1442) | def manual_expansion(self, value): method id (line 1447) | def id(self): method id (line 1452) | def id(self, value): method text (line 1457) | def text(self): method text (line 1462) | def text(self, value): method lemma (line 1467) | def lemma(self): method lemma (line 1472) | def lemma(self, value): method upos (line 1477) | def upos(self): method upos (line 1482) | def upos(self, value): method xpos (line 1487) | def xpos(self): method xpos (line 1492) | def xpos(self, value): method feats (line 1497) | def feats(self): method feats (line 1502) | def feats(self, value): method head (line 1507) | def head(self): method head (line 1512) | def head(self, value): method deprel (line 1517) | def deprel(self): method deprel (line 1522) | def deprel(self, value): method deps (line 1527) | def deps(self): method deps (line 1548) | def deps(self, value): method misc (line 1581) | def misc(self): method misc (line 1586) | def misc(self, value): method line_number (line 1591) | def line_number(self): method start_char (line 1596) | def start_char(self): method start_char (line 1601) | def start_char(self, value): method end_char (line 1605) | def end_char(self): method end_char (line 1610) | def end_char(self, value): method parent (line 1614) | def parent(self): method parent (line 1621) | def parent(self, value): method pos (line 1628) | def pos(self): method pos (line 1633) | def pos(self, value): method coref_chains (line 1638) | def coref_chains(self): method coref_chains (line 1651) | def coref_chains(self, chain): method sent (line 1656) | def sent(self): method sent (line 1661) | def sent(self, value): method __repr__ (line 1665) | def __repr__(self): method __format__ (line 1668) | def __format__(self, spec): method to_conll_text (line 1676) | def to_conll_text(self, fields=DEFAULT_OUTPUT_FIELDS): method to_dict (line 1683) | def to_dict(self, fields=DEFAULT_OUTPUT_FIELDS): method pretty_print (line 1692) | def pretty_print(self): method _is_null (line 1698) | def _is_null(self, value): class Span (line 1702) | class Span(StanzaObject): method __init__ (line 1707) | def __init__(self, span_entry=None, tokens=None, type=None, doc=None, ... method init_from_entry (line 1726) | def init_from_entry(self, span_entry): method init_from_tokens (line 1732) | def init_from_tokens(self, tokens, type): method doc (line 1763) | def doc(self): method doc (line 1768) | def doc(self, value): method text (line 1773) | def text(self): method text (line 1778) | def text(self, value): method tokens (line 1783) | def tokens(self): method tokens (line 1788) | def tokens(self, value): method words (line 1793) | def words(self): method words (line 1798) | def words(self, value): method type (line 1803) | def type(self): method type (line 1808) | def type(self, value): method start_char (line 1813) | def start_char(self): method start_char (line 1818) | def start_char(self, value): method end_char (line 1823) | def end_char(self): method end_char (line 1828) | def end_char(self, value): method sent (line 1833) | def sent(self): method sent (line 1838) | def sent(self, value): method to_dict (line 1842) | def to_dict(self): method __repr__ (line 1848) | def __repr__(self): method pretty_print (line 1851) | def pretty_print(self): FILE: stanza/models/common/dropout.py class WordDropout (line 4) | class WordDropout(nn.Module): method __init__ (line 9) | def __init__(self, dropprob): method forward (line 13) | def forward(self, x, replacement=None): method extra_repr (line 27) | def extra_repr(self): class LockedDropout (line 30) | class LockedDropout(nn.Module): method __init__ (line 35) | def __init__(self, dropprob, batch_first=True): method forward (line 40) | def forward(self, x): method extra_repr (line 52) | def extra_repr(self): class SequenceUnitDropout (line 55) | class SequenceUnitDropout(nn.Module): method __init__ (line 59) | def __init__(self, dropprob, replacement_id): method forward (line 64) | def forward(self, x): method extra_repr (line 73) | def extra_repr(self): FILE: stanza/models/common/exceptions.py class ForwardCharlmNotFoundError (line 9) | class ForwardCharlmNotFoundError(FileNotFoundError): method __init__ (line 10) | def __init__(self, msg, filename): class BackwardCharlmNotFoundError (line 13) | class BackwardCharlmNotFoundError(FileNotFoundError): method __init__ (line 14) | def __init__(self, msg, filename): FILE: stanza/models/common/foundation_cache.py class FoundationCache (line 18) | class FoundationCache: method __init__ (line 19) | def __init__(self, other=None, local_files_only=False): method load_bert (line 34) | def load_bert(self, transformer_name, local_files_only=None): method load_bert_with_peft (line 38) | def load_bert_with_peft(self, transformer_name, peft_name, local_files... method load_charlm (line 65) | def load_charlm(self, filename): method load_pretrain (line 78) | def load_pretrain(self, filename): class NoTransformerFoundationCache (line 95) | class NoTransformerFoundationCache(FoundationCache): method load_bert (line 104) | def load_bert(self, transformer_name, local_files_only=None): method load_bert_with_peft (line 107) | def load_bert_with_peft(self, transformer_name, peft_name, local_files... function load_bert (line 110) | def load_bert(model_name, foundation_cache=None, local_files_only=None): function load_bert_with_peft (line 119) | def load_bert_with_peft(model_name, peft_name, foundation_cache=None, lo... function load_charlm (line 125) | def load_charlm(charlm_file, foundation_cache=None, finetune=False): function load_pretrain (line 140) | def load_pretrain(filename, foundation_cache=None): FILE: stanza/models/common/hlstm.py class HLSTMCell (line 8) | class HLSTMCell(nn.modules.rnn.RNNCellBase): method __init__ (line 13) | def __init__(self, input_size, hidden_size, bias=True): method forward (line 27) | def forward(self, input, c_l_minus_one=None, hx=None): class HighwayLSTM (line 55) | class HighwayLSTM(nn.Module): method __init__ (line 60) | def __init__(self, input_size, hidden_size, method forward (line 91) | def forward(self, input, seqlens, hx=None): FILE: stanza/models/common/large_margin_loss.py class LargeMarginInSoftmaxLoss (line 27) | class LargeMarginInSoftmaxLoss(nn.CrossEntropyLoss): method __init__ (line 40) | def __init__(self, reg_lambda=0.3, deg_logit=None, method forward (line 47) | def forward(self, input, target): FILE: stanza/models/common/loss.py function SequenceLoss (line 14) | def SequenceLoss(vocab_size): function weighted_cross_entropy_loss (line 20) | def weighted_cross_entropy_loss(labels, log_dampened=False): class FocalLoss (line 39) | class FocalLoss(nn.Module): method __init__ (line 50) | def __init__(self, reduction='mean', gamma=2.0): method forward (line 59) | def forward(self, inputs, targets): class MixLoss (line 88) | class MixLoss(nn.Module): method __init__ (line 93) | def __init__(self, vocab_size, alpha): method forward (line 100) | def forward(self, seq_inputs, seq_targets, class_inputs, class_targets): class MaxEntropySequenceLoss (line 106) | class MaxEntropySequenceLoss(nn.Module): method __init__ (line 113) | def __init__(self, vocab_size, alpha): method forward (line 120) | def forward(self, inputs, targets): FILE: stanza/models/common/maxout_linear.py class MaxoutLinear (line 22) | class MaxoutLinear(nn.Module): method __init__ (line 23) | def __init__(self, in_channels, out_channels, maxout_k): method forward (line 32) | def forward(self, inputs): FILE: stanza/models/common/packed_lstm.py class PackedLSTM (line 6) | class PackedLSTM(nn.Module): method __init__ (line 7) | def __init__(self, input_size, hidden_size, num_layers, bias=True, bat... method forward (line 18) | def forward(self, input, lengths, hx=None): class LSTMwRecDropout (line 27) | class LSTMwRecDropout(nn.Module): method __init__ (line 29) | def __init__(self, input_size, hidden_size, num_layers, bias=True, bat... method forward (line 48) | def forward(self, input, hx=None): FILE: stanza/models/common/peft_config.py function add_peft_args (line 24) | def add_peft_args(parser): function pop_peft_args (line 36) | def pop_peft_args(args): function resolve_peft_args (line 52) | def resolve_peft_args(args, logger, check_bert_finetune=True): function build_peft_config (line 84) | def build_peft_config(args, logger): function build_peft_wrapper (line 97) | def build_peft_wrapper(bert_model, args, logger, adapter_name="default"): function load_peft_wrapper (line 111) | def load_peft_wrapper(bert_model, lora_params, args, logger, adapter_name): FILE: stanza/models/common/pretrain.py class PretrainedWordVocab (line 23) | class PretrainedWordVocab(BaseVocab): method build_vocab (line 24) | def build_vocab(self): method normalize_unit (line 28) | def normalize_unit(self, unit): class Pretrain (line 34) | class Pretrain: method __init__ (line 37) | def __init__(self, filename=None, vec_filename=None, max_vocab=-1, sav... method __len__ (line 44) | def __len__(self): method vocab (line 48) | def vocab(self): method emb (line 54) | def emb(self): method load (line 59) | def load(self): method save (line 100) | def save(self, filename): method write_text (line 115) | def write_text(self, filename, header=False): method read_pretrain (line 131) | def read_pretrain(self): method read_from_csv (line 153) | def read_from_csv(filename): method read_from_file (line 178) | def read_from_file(filename, max_vocab=None): function find_pretrain_file (line 239) | def find_pretrain_file(wordvec_pretrain_file, save_dir, shorthand, lang): FILE: stanza/models/common/relative_attn.py class RelativeAttention (line 9) | class RelativeAttention(nn.Module): method __init__ (line 10) | def __init__(self, d_model, num_heads, window=8, dropout=0.2, reverse=... method forward (line 50) | def forward(self, x, sink=None): method skew_repeat (line 116) | def skew_repeat(self, q): FILE: stanza/models/common/seq2seq_model.py class Seq2SeqModel (line 19) | class Seq2SeqModel(nn.Module): method __init__ (line 26) | def __init__(self, args, emb_matrix=None, contextual_embedding=None): method add_unsaved_module (line 88) | def add_unsaved_module(self, name, module): method init_weights (line 92) | def init_weights(self): method zero_state (line 116) | def zero_state(self, inputs): method encode (line 123) | def encode(self, enc_inputs, lens): method decode (line 134) | def decode(self, dec_inputs, hn, cn, ctx, ctx_mask=None, src=None, nev... method embed (line 213) | def embed(self, src, src_mask, pos, raw): method forward (line 233) | def forward(self, src, src_mask, tgt_in, pos=None, raw=None): method get_log_prob (line 250) | def get_log_prob(self, logits): method predict_greedy (line 257) | def predict_greedy(self, src, src_mask, pos=None, raw=None, never_deco... method predict (line 298) | def predict(self, src, src_mask, pos=None, beam_size=5, raw=None, neve... FILE: stanza/models/common/seq2seq_modules.py class BasicAttention (line 15) | class BasicAttention(nn.Module): method __init__ (line 19) | def __init__(self, dim): method forward (line 28) | def forward(self, input, context, mask=None, attn_only=False): class SoftDotAttention (line 55) | class SoftDotAttention(nn.Module): method __init__ (line 62) | def __init__(self, dim): method forward (line 71) | def forward(self, input, context, mask=None, attn_only=False, return_l... class LinearAttention (line 106) | class LinearAttention(nn.Module): method __init__ (line 111) | def __init__(self, dim): method forward (line 119) | def forward(self, input, context, mask=None, attn_only=False): class DeepAttention (line 148) | class DeepAttention(nn.Module): method __init__ (line 155) | def __init__(self, dim): method forward (line 165) | def forward(self, input, context, mask=None, attn_only=False): class LSTMAttention (line 194) | class LSTMAttention(nn.Module): method __init__ (line 197) | def __init__(self, input_size, hidden_size, batch_first=True, attn_typ... method forward (line 218) | def forward(self, input, hidden, ctx, ctx_mask=None, return_logattn=Fa... FILE: stanza/models/common/seq2seq_utils.py function get_optimizer (line 12) | def get_optimizer(name, parameters, lr): function change_lr (line 24) | def change_lr(optimizer, new_lr): function flatten_indices (line 28) | def flatten_indices(seq_lens, width): function keep_partial_grad (line 35) | def keep_partial_grad(grad, topk): function save_config (line 44) | def save_config(config, path, verbose=True): function load_config (line 51) | def load_config(path, verbose=True): function unmap_with_copy (line 58) | def unmap_with_copy(indices, src_tokens, vocab): function prune_decoded_seqs (line 74) | def prune_decoded_seqs(seqs): function prune_hyp (line 87) | def prune_hyp(hyp): function prune (line 97) | def prune(data_list, lens): function sort (line 104) | def sort(packed, ref, reverse=True): function unsort (line 114) | def unsort(sorted_list, oidx): FILE: stanza/models/common/short_name_to_treebank.py function short_name_to_treebank (line 355) | def short_name_to_treebank(short_name): function canonical_treebank_name (line 702) | def canonical_treebank_name(ud_name): FILE: stanza/models/common/stanza_object.py function _readonly_setter (line 1) | def _readonly_setter(self, name): class StanzaObject (line 9) | class StanzaObject(object): method add_property (line 15) | def add_property(cls, name, default=None, getter=None, setter=None): FILE: stanza/models/common/trainer.py class Trainer (line 3) | class Trainer: method change_lr (line 4) | def change_lr(self, new_lr): method save (line 8) | def save(self, filename): method load (line 15) | def load(self, filename): FILE: stanza/models/common/utils.py function get_wordvec_file (line 40) | def get_wordvec_file(wordvec_dir, shorthand, wordvec_type=None): function output_stream (line 68) | def output_stream(filename=None): function open_read_text (line 82) | def open_read_text(filename, encoding="utf-8"): function open_read_binary (line 105) | def open_read_binary(filename): function get_adaptive_eval_interval (line 139) | def get_adaptive_eval_interval(cur_dev_size, thres_dev_size, base_interv... function ud_scores (line 151) | def ud_scores(gold_conllu_file, system_conllu_file): function harmonic_mean (line 181) | def harmonic_mean(a, weights=None): function dispatch_optimizer (line 192) | def dispatch_optimizer(name, parameters, opt_logger, lr=None, betas=None... function get_optimizer (line 250) | def get_optimizer(name, model, lr, betas=(0.9, 0.999), eps=1e-8, momentu... function get_split_optimizer (line 293) | def get_split_optimizer(name, model, lr, betas=(0.9, 0.999), eps=1e-8, m... function change_lr (line 338) | def change_lr(optimizer, new_lr): function flatten_indices (line 342) | def flatten_indices(seq_lens, width): function keep_partial_grad (line 349) | def keep_partial_grad(grad, topk): function ensure_dir (line 358) | def ensure_dir(d, verbose=True): function save_config (line 365) | def save_config(config, path, verbose=True): function load_config (line 372) | def load_config(path, verbose=True): function print_config (line 379) | def print_config(config): function normalize_text (line 385) | def normalize_text(text): function unmap_with_copy (line 388) | def unmap_with_copy(indices, src_tokens, vocab): function prune_decoded_seqs (line 404) | def prune_decoded_seqs(seqs): function prune_hyp (line 417) | def prune_hyp(hyp): function prune (line 427) | def prune(data_list, lens): function sort (line 434) | def sort(packed, ref, reverse=True): function unsort (line 444) | def unsort(sorted_list, oidx): function sort_with_indices (line 454) | def sort_with_indices(data, key=None, reverse=False): function split_into_batches (line 471) | def split_into_batches(data, batch_size): function tensor_unsort (line 503) | def tensor_unsort(sorted_tensor, oidx): function set_random_seed (line 512) | def set_random_seed(seed): function find_missing_tags (line 530) | def find_missing_tags(known_tags, test_tags): function warn_missing_tags (line 538) | def warn_missing_tags(known_tags, test_tags, test_set_name): function checkpoint_name (line 550) | def checkpoint_name(save_dir, save_name, checkpoint_name): function default_device (line 570) | def default_device(): function add_device_args (line 578) | def add_device_args(parser): function load_elmo (line 586) | def load_elmo(elmo_model): function log_training_args (line 595) | def log_training_args(args, args_logger, name="training"): function embedding_name (line 605) | def embedding_name(args): function standard_model_file_name (line 627) | def standard_model_file_name(args, model_type, **kwargs): function escape_misc_space (line 686) | def escape_misc_space(space): function unescape_misc_space (line 708) | def unescape_misc_space(misc_space): function space_before_to_misc (line 739) | def space_before_to_misc(space): function space_after_to_misc (line 755) | def space_after_to_misc(space): function misc_to_space_before (line 766) | def misc_to_space_before(misc): function misc_to_space_after (line 780) | def misc_to_space_after(misc): function log_norms (line 806) | def log_norms(model): function attach_bert_model (line 819) | def attach_bert_model(model, bert_model, bert_tokenizer, use_peft, force... function build_save_each_filename (line 834) | def build_save_each_filename(base_filename): function build_nonlinearity (line 912) | def build_nonlinearity(nonlinearity): function update_word_cutoff (line 924) | def update_word_cutoff(pt, word_cutoff): function simplify_punct (line 999) | def simplify_punct(data): FILE: stanza/models/common/vocab.py class BaseVocab (line 18) | class BaseVocab: method __init__ (line 21) | def __init__(self, data=None, lang="", idx=0, cutoff=0, lower=False): method build_vocab (line 31) | def build_vocab(self): method state_dict (line 34) | def state_dict(self): method load_state_dict (line 44) | def load_state_dict(cls, state_dict): method normalize_unit (line 51) | def normalize_unit(self, unit): method unit2id (line 60) | def unit2id(self, unit): method id2unit (line 67) | def id2unit(self, id): method map (line 70) | def map(self, units): method unmap (line 73) | def unmap(self, ids): method __str__ (line 76) | def __str__(self): method __len__ (line 81) | def __len__(self): method __getitem__ (line 84) | def __getitem__(self, key): method __contains__ (line 92) | def __contains__(self, key): method size (line 96) | def size(self): class DeltaVocab (line 99) | class DeltaVocab(BaseVocab): method __init__ (line 107) | def __init__(self, data, orig_vocab): method build_vocab (line 111) | def build_vocab(self): class CompositeVocab (line 128) | class CompositeVocab(BaseVocab): method __init__ (line 142) | def __init__(self, data=None, lang="", idx=0, sep="", keyed=False): method unit2parts (line 148) | def unit2parts(self, unit): method unit2id (line 167) | def unit2id(self, unit): method id2unit (line 175) | def id2unit(self, id): method build_vocab (line 194) | def build_vocab(self): method lens (line 233) | def lens(self): method items (line 236) | def items(self, idx): method __str__ (line 239) | def __str__(self): class BaseMultiVocab (line 244) | class BaseMultiVocab: method __init__ (line 249) | def __init__(self, vocab_dict=None): method __setitem__ (line 258) | def __setitem__(self, key, item): method __getitem__ (line 261) | def __getitem__(self, key): method __str__ (line 264) | def __str__(self): method __contains__ (line 267) | def __contains__(self, key): method keys (line 270) | def keys(self): method state_dict (line 273) | def state_dict(self): method load_state_dict (line 281) | def load_state_dict(cls, state_dict): class CharVocab (line 287) | class CharVocab(BaseVocab): method build_vocab (line 288) | def build_vocab(self): FILE: stanza/models/constituency/base_model.py class BaseModel (line 39) | class BaseModel(ABC): method __init__ (line 49) | def __init__(self, transition_scheme, unary_limit, reverse_sentence, r... method initial_word_queues (line 62) | def initial_word_queues(self, tagged_word_lists): method initial_transitions (line 70) | def initial_transitions(self): method initial_constituents (line 76) | def initial_constituents(self): method get_word (line 82) | def get_word(self, word_node): method transform_word_to_constituent (line 88) | def transform_word_to_constituent(self, state): method dummy_constituent (line 94) | def dummy_constituent(self, dummy): method build_constituents (line 100) | def build_constituents(self, labels, children_lists): method push_constituents (line 106) | def push_constituents(self, constituent_stacks, constituents): method get_top_constituent (line 114) | def get_top_constituent(self, constituents): method push_transitions (line 122) | def push_transitions(self, transition_stacks, transitions): method get_top_transition (line 130) | def get_top_transition(self, transitions): method root_labels (line 138) | def root_labels(self): method unary_limit (line 146) | def unary_limit(self): method transition_scheme (line 153) | def transition_scheme(self): method has_unary_transitions (line 159) | def has_unary_transitions(self): method is_top_down (line 166) | def is_top_down(self): method reverse_sentence (line 173) | def reverse_sentence(self): method predict (line 179) | def predict(self, states, is_legal=True): method weighted_choice (line 182) | def weighted_choice(self, states): method predict_gold (line 185) | def predict_gold(self, states, is_legal=True): method initial_state_from_preterminals (line 196) | def initial_state_from_preterminals(self, preterminal_lists, gold_tree... method initial_state_from_words (line 221) | def initial_state_from_words(self, word_lists): method initial_state_from_gold_trees (line 226) | def initial_state_from_gold_trees(self, trees, gold_sequences=None): method build_batch_from_trees (line 232) | def build_batch_from_trees(self, batch_size, data_iterator): method build_batch_from_trees_with_gold_sequence (line 247) | def build_batch_from_trees_with_gold_sequence(self, batch_size, data_i... method build_batch_from_tagged_words (line 259) | def build_batch_from_tagged_words(self, batch_size, data_iterator): method parse_sentences (line 277) | def parse_sentences(self, data_iterator, build_batch_fn, batch_size, t... method parse_sentences_no_grad (line 356) | def parse_sentences_no_grad(self, data_iterator, build_batch_fn, batch... method analyze_trees (line 366) | def analyze_trees(self, trees, batch_size=None, keep_state=True, keep_... method parse_tagged_words (line 383) | def parse_tagged_words(self, words, batch_size): method bulk_apply (line 404) | def bulk_apply(self, state_batch, transitions, fail=False): class SimpleModel (line 478) | class SimpleModel(BaseModel): method __init__ (line 489) | def __init__(self, transition_scheme=TransitionScheme.TOP_DOWN_UNARY, ... method initial_word_queues (line 492) | def initial_word_queues(self, tagged_word_lists): method initial_transitions (line 503) | def initial_transitions(self): method initial_constituents (line 506) | def initial_constituents(self): method get_word (line 509) | def get_word(self, word_node): method transform_word_to_constituent (line 512) | def transform_word_to_constituent(self, state): method dummy_constituent (line 515) | def dummy_constituent(self, dummy): method build_constituents (line 518) | def build_constituents(self, labels, children_lists): method push_constituents (line 528) | def push_constituents(self, constituent_stacks, constituents): method get_top_constituent (line 531) | def get_top_constituent(self, constituents): method push_transitions (line 534) | def push_transitions(self, transition_stacks, transitions): method get_top_transition (line 537) | def get_top_transition(self, transitions): FILE: stanza/models/constituency/base_trainer.py class ModelType (line 12) | class ModelType(Enum): class BaseTrainer (line 16) | class BaseTrainer: method __init__ (line 17) | def __init__(self, model, optimizer=None, scheduler=None, epochs_train... method save (line 29) | def save(self, filename, save_optimizer=True): method log_norms (line 47) | def log_norms(self): method log_shapes (line 50) | def log_shapes(self): method transitions (line 54) | def transitions(self): method root_labels (line 58) | def root_labels(self): method device (line 62) | def device(self): method train (line 65) | def train(self): method eval (line 68) | def eval(self): method load (line 74) | def load(filename, args=None, load_optimizer=False, foundation_cache=N... FILE: stanza/models/constituency/dynamic_oracle.py function score_candidates_single_block (line 9) | def score_candidates_single_block(model, state, candidates, candidate_idx): function score_candidates (line 33) | def score_candidates(model, state, candidates): function advance_past_constituents (line 60) | def advance_past_constituents(gold_sequence, cur_index): function find_previous_open (line 76) | def find_previous_open(gold_sequence, cur_index): function find_in_order_constituent_end (line 94) | def find_in_order_constituent_end(gold_sequence, cur_index): class DynamicOracle (line 118) | class DynamicOracle(): method __init__ (line 119) | def __init__(self, root_labels, oracle_level, repair_types, additional... method fix_error (line 132) | def fix_error(self, pred_transition, model, state): FILE: stanza/models/constituency/ensemble.py class Ensemble (line 48) | class Ensemble(nn.Module): method __init__ (line 49) | def __init__(self, args, filenames=None, models=None, foundation_cache... method detach_submodels (line 98) | def detach_submodels(self): method train (line 104) | def train(self, mode=True): method transitions (line 112) | def transitions(self): method root_labels (line 116) | def root_labels(self): method device (line 120) | def device(self): method unary_limit (line 123) | def unary_limit(self): method transition_scheme (line 129) | def transition_scheme(self): method has_unary_transitions (line 132) | def has_unary_transitions(self): method is_top_down (line 136) | def is_top_down(self): method reverse_sentence (line 140) | def reverse_sentence(self): method retag_method (line 144) | def retag_method(self): method uses_xpos (line 148) | def uses_xpos(self): method get_top_constituent (line 151) | def get_top_constituent(self, constituents): method get_top_transition (line 154) | def get_top_transition(self, transitions): method log_norms (line 157) | def log_norms(self): method log_shapes (line 171) | def log_shapes(self): method get_params (line 178) | def get_params(self): method initial_state_from_preterminals (line 187) | def initial_state_from_preterminals(self, preterminal_lists, gold_tree... method build_batch_from_tagged_words (line 194) | def build_batch_from_tagged_words(self, batch_size, data_iterator): method build_batch_from_trees (line 213) | def build_batch_from_trees(self, batch_size, data_iterator): method predict (line 230) | def predict(self, states, is_legal=True): method bulk_apply (line 263) | def bulk_apply(self, state_batch, transitions, fail=False): method parse_tagged_words (line 272) | def parse_tagged_words(self, words, batch_size): method parse_sentences (line 295) | def parse_sentences(self, data_iterator, build_batch_fn, batch_size, t... method parse_sentences_no_grad (line 362) | def parse_sentences_no_grad(self, data_iterator, build_batch_fn, batch... class EnsembleTrainer (line 366) | class EnsembleTrainer(BaseTrainer): method __init__ (line 370) | def __init__(self, ensemble, optimizer=None, scheduler=None, epochs_tr... method from_files (line 374) | def from_files(args, filenames, foundation_cache=None): method get_peft_params (line 379) | def get_peft_params(self): method model_type (line 391) | def model_type(self): method log_num_words_known (line 394) | def log_num_words_known(self, words): method build_optimizer (line 402) | def build_optimizer(args, model, first_optimizer): method load_optimizer (line 417) | def load_optimizer(model, checkpoint, first_optimizer, filename): method load_scheduler (line 429) | def load_scheduler(model, optimizer, checkpoint, first_optimizer): method model_from_params (line 436) | def model_from_params(params, peft_params, args, foundation_cache=None... function parse_args (line 459) | def parse_args(args=None): function main (line 478) | def main(args=None): FILE: stanza/models/constituency/error_analysis_in_order.py class FirstError (line 15) | class FirstError(Enum): function advance_past_unaries (line 29) | def advance_past_unaries(sequence, idx): function check_attachment_error (line 34) | def check_attachment_error(gold_sequence, pred_sequence, idx, error_type): function analyze_tree (line 59) | def analyze_tree(gold_tree, pred_tree): FILE: stanza/models/constituency/evaluate_treebanks.py function main (line 13) | def main(): FILE: stanza/models/constituency/in_order_compound_oracle.py function fix_missing_unary_error (line 6) | def fix_missing_unary_error(gold_transition, pred_transition, gold_seque... function fix_wrong_unary_error (line 22) | def fix_wrong_unary_error(gold_transition, pred_transition, gold_sequenc... function fix_spurious_unary_error (line 33) | def fix_spurious_unary_error(gold_transition, pred_transition, gold_sequ... function fix_open_shift_error (line 42) | def fix_open_shift_error(gold_transition, pred_transition, gold_sequence... function fix_open_open_two_subtrees_error (line 63) | def fix_open_open_two_subtrees_error(gold_transition, pred_transition, g... function fix_open_open_error (line 81) | def fix_open_open_error(gold_transition, pred_transition, gold_sequence,... function fix_open_open_three_subtrees_error (line 111) | def fix_open_open_three_subtrees_error(gold_transition, pred_transition,... function fix_open_open_many_subtrees_error (line 114) | def fix_open_open_many_subtrees_error(gold_transition, pred_transition, ... function fix_open_close_error (line 117) | def fix_open_close_error(gold_transition, pred_transition, gold_sequence... function fix_shift_close_error (line 142) | def fix_shift_close_error(gold_transition, pred_transition, gold_sequenc... function fix_shift_open_unambiguous_error (line 161) | def fix_shift_open_unambiguous_error(gold_transition, pred_transition, g... function fix_close_shift_unambiguous_error (line 178) | def fix_close_shift_unambiguous_error(gold_transition, pred_transition, ... class RepairType (line 197) | class RepairType(Enum): method __new__ (line 215) | def __new__(cls, fn, correct=False, debug=False): method is_correct (line 228) | def is_correct(self): class InOrderCompoundOracle (line 325) | class InOrderCompoundOracle(DynamicOracle): method __init__ (line 326) | def __init__(self, root_labels, oracle_level, additional_oracle_levels... FILE: stanza/models/constituency/in_order_oracle.py function fix_wrong_open_root_error (line 6) | def fix_wrong_open_root_error(gold_transition, pred_transition, gold_seq... function fix_wrong_open_unary_chain (line 18) | def fix_wrong_open_unary_chain(gold_transition, pred_transition, gold_se... function fix_wrong_open_subtrees (line 38) | def fix_wrong_open_subtrees(gold_transition, pred_transition, gold_seque... function fix_wrong_open_two_subtrees (line 63) | def fix_wrong_open_two_subtrees(gold_transition, pred_transition, gold_s... function fix_wrong_open_multiple_subtrees (line 66) | def fix_wrong_open_multiple_subtrees(gold_transition, pred_transition, g... function advance_past_unaries (line 69) | def advance_past_unaries(gold_sequence, cur_index): function fix_wrong_open_stuff_unary (line 74) | def fix_wrong_open_stuff_unary(gold_transition, pred_transition, gold_se... function fix_wrong_open_general (line 117) | def fix_wrong_open_general(gold_transition, pred_transition, gold_sequen... function fix_missed_unary (line 139) | def fix_missed_unary(gold_transition, pred_transition, gold_sequence, go... function fix_open_shift (line 154) | def fix_open_shift(gold_transition, pred_transition, gold_sequence, gold... function fix_open_close (line 211) | def fix_open_close(gold_transition, pred_transition, gold_sequence, gold... function fix_shift_close (line 277) | def fix_shift_close(gold_transition, pred_transition, gold_sequence, gol... function fix_close_shift_open_bracket (line 306) | def fix_close_shift_open_bracket(gold_transition, pred_transition, gold_... function fix_close_open_shift_unambiguous_bracket (line 347) | def fix_close_open_shift_unambiguous_bracket(gold_transition, pred_trans... function fix_close_open_shift_ambiguous_bracket_early (line 350) | def fix_close_open_shift_ambiguous_bracket_early(gold_transition, pred_t... function fix_close_open_shift_ambiguous_bracket_late (line 353) | def fix_close_open_shift_ambiguous_bracket_late(gold_transition, pred_tr... function fix_close_open_shift_ambiguous_predicted (line 356) | def fix_close_open_shift_ambiguous_predicted(gold_transition, pred_trans... function fix_close_open_shift_nested (line 404) | def fix_close_open_shift_nested(gold_transition, pred_transition, gold_s... function fix_close_shift_shift (line 444) | def fix_close_shift_shift(gold_transition, pred_transition, gold_sequenc... function fix_close_shift_shift_unambiguous (line 481) | def fix_close_shift_shift_unambiguous(gold_transition, pred_transition, ... function fix_close_shift_shift_ambiguous_early (line 484) | def fix_close_shift_shift_ambiguous_early(gold_transition, pred_transiti... function fix_close_shift_shift_ambiguous_late (line 487) | def fix_close_shift_shift_ambiguous_late(gold_transition, pred_transitio... function fix_close_shift_shift_ambiguous_predicted (line 490) | def fix_close_shift_shift_ambiguous_predicted(gold_transition, pred_tran... function ambiguous_shift_open_unary_close (line 524) | def ambiguous_shift_open_unary_close(gold_transition, pred_transition, g... function ambiguous_shift_open_early_close (line 532) | def ambiguous_shift_open_early_close(gold_transition, pred_transition, g... function ambiguous_shift_open_late_close (line 543) | def ambiguous_shift_open_late_close(gold_transition, pred_transition, go... function ambiguous_shift_open_predicted_close (line 552) | def ambiguous_shift_open_predicted_close(gold_transition, pred_transitio... function report_close_shift (line 587) | def report_close_shift(gold_transition, pred_transition, gold_sequence, ... function report_close_open (line 595) | def report_close_open(gold_transition, pred_transition, gold_sequence, g... function report_open_open (line 603) | def report_open_open(gold_transition, pred_transition, gold_sequence, go... function report_open_shift (line 611) | def report_open_shift(gold_transition, pred_transition, gold_sequence, g... function report_open_close (line 619) | def report_open_close(gold_transition, pred_transition, gold_sequence, g... function report_shift_open (line 627) | def report_shift_open(gold_transition, pred_transition, gold_sequence, g... class RepairType (line 635) | class RepairType(Enum): method __new__ (line 786) | def __new__(cls, fn, correct=False, debug=False): method is_correct (line 803) | def is_correct(self): class InOrderOracle (line 1027) | class InOrderOracle(DynamicOracle): method __init__ (line 1028) | def __init__(self, root_labels, oracle_level, additional_oracle_levels... FILE: stanza/models/constituency/label_attention.py class BatchIndices (line 13) | class BatchIndices: method __init__ (line 17) | def __init__(self, batch_idxs_np, device): class FeatureDropoutFunction (line 36) | class FeatureDropoutFunction(torch.autograd.function.InplaceFunction): method forward (line 38) | def forward(cls, ctx, input, batch_idxs, p=0.5, train=False, inplace=F... method backward (line 65) | def backward(ctx, grad_output): class FeatureDropout (line 72) | class FeatureDropout(nn.Module): method __init__ (line 78) | def __init__(self, p=0.5, inplace=False): method forward (line 86) | def forward(self, input, batch_idxs): class LayerNormalization (line 91) | class LayerNormalization(nn.Module): method __init__ (line 92) | def __init__(self, d_hid, eps=1e-3, affine=True): method forward (line 101) | def forward(self, z): class ScaledDotProductAttention (line 115) | class ScaledDotProductAttention(nn.Module): method __init__ (line 116) | def __init__(self, d_model, attention_dropout=0.1): method forward (line 122) | def forward(self, q, k, v, attn_mask=None): class MultiHeadAttention (line 153) | class MultiHeadAttention(nn.Module): method __init__ (line 158) | def __init__(self, n_head, d_model, d_k, d_v, residual_dropout=0.1, at... method split_qkv_packed (line 211) | def split_qkv_packed(self, inp, qk_inp=None): method pad_and_rearrange (line 237) | def pad_and_rearrange(self, q_s, k_s, v_s, batch_idxs): method combine_v (line 265) | def combine_v(self, outputs): method forward (line 289) | def forward(self, inp, batch_idxs, qk_inp=None): class PositionwiseFeedForward (line 315) | class PositionwiseFeedForward(nn.Module): method __init__ (line 323) | def __init__(self, d_hid, d_ff, relu_dropout=0.1, residual_dropout=0.1): method forward (line 334) | def forward(self, x, batch_idxs): class PartitionedPositionwiseFeedForward (line 345) | class PartitionedPositionwiseFeedForward(nn.Module): method __init__ (line 346) | def __init__(self, d_hid, d_ff, d_positional, relu_dropout=0.1, residu... method forward (line 358) | def forward(self, x, batch_idxs): class LabelAttention (line 376) | class LabelAttention(nn.Module): method __init__ (line 381) | def __init__(self, d_model, d_k, d_v, d_l, d_proj, combine_as_self, us... method split_qkv_packed (line 461) | def split_qkv_packed(self, inp, k_inp=None): method pad_and_rearrange (line 497) | def pad_and_rearrange(self, q_s, k_s, v_s, batch_idxs): method combine_v (line 537) | def combine_v(self, outputs): method forward (line 567) | def forward(self, inp, batch_idxs, k_inp=None): class LabelAttentionModule (line 619) | class LabelAttentionModule(nn.Module): method __init__ (line 625) | def __init__(self, method forward (line 682) | def forward(self, word_embeddings, tagged_word_lists): FILE: stanza/models/constituency/lstm_model.py class SentenceBoundary (line 69) | class SentenceBoundary(Enum): class StackHistory (line 74) | class StackHistory(Enum): class ConstituencyComposition (line 203) | class ConstituencyComposition(Enum): class LSTMModel (line 215) | class LSTMModel(BaseModel, nn.Module): method __init__ (line 216) | def __init__(self, pretrain, forward_charlm, backward_charlm, bert_mod... method uses_lattn (line 604) | def uses_lattn(args): method uses_pattn (line 608) | def uses_pattn(args): method copy_with_new_structure (line 611) | def copy_with_new_structure(self, other): method build_output_layers (line 648) | def build_output_layers(self, num_output_layers, final_layer_size, max... method num_words_known (line 672) | def num_words_known(self, words): method retag_method (line 676) | def retag_method(self): method uses_xpos (line 680) | def uses_xpos(self): method add_unsaved_module (line 683) | def add_unsaved_module(self, name, module): method is_unsaved_module (line 695) | def is_unsaved_module(self, name): method get_norms (line 698) | def get_norms(self): method log_norms (line 720) | def log_norms(self): method log_shapes (line 725) | def log_shapes(self): method initial_word_queues (line 732) | def initial_word_queues(self, tagged_word_lists): method initial_transitions (line 881) | def initial_transitions(self): method initial_constituents (line 887) | def initial_constituents(self): method get_word (line 893) | def get_word(self, word_node): method transform_word_to_constituent (line 896) | def transform_word_to_constituent(self, state): method dummy_constituent (line 912) | def dummy_constituent(self, dummy): method build_constituents (line 919) | def build_constituents(self, labels, children_lists): method push_constituents (line 1068) | def push_constituents(self, constituent_stacks, constituents): method get_top_constituent (line 1085) | def get_top_constituent(self, constituents): method push_transitions (line 1094) | def push_transitions(self, transition_stacks, transitions): method get_top_transition (line 1104) | def get_top_transition(self, transitions): method forward (line 1113) | def forward(self, states): method predict (line 1140) | def predict(self, states, is_legal=True): method weighted_choice (line 1174) | def weighted_choice(self, states): method predict_gold (line 1197) | def predict_gold(self, states): method get_params (line 1207) | def get_params(self, skip_modules=True): FILE: stanza/models/constituency/lstm_tree_stack.py class LSTMTreeStack (line 21) | class LSTMTreeStack(nn.Module): method __init__ (line 22) | def __init__(self, input_size, hidden_size, num_lstm_layers, dropout, ... method initial_state (line 48) | def initial_state(self, initial_value=None): method push_states (line 68) | def push_states(self, stacks, values, inputs): method output (line 85) | def output(self, stack): FILE: stanza/models/constituency/parse_transitions.py class TransitionScheme (line 16) | class TransitionScheme(Enum): method __new__ (line 17) | def __new__(cls, value, short_name): class Transition (line 59) | class Transition(ABC): method update_state (line 65) | def update_state(self, state, model): method delta_opens (line 83) | def delta_opens(self): method apply (line 86) | def apply(self, state, model): method is_legal (line 97) | def is_legal(self, state, model): method components (line 104) | def components(self): method short_name (line 114) | def short_name(self): method short_label (line 119) | def short_label(self): method __lt__ (line 131) | def __lt__(self, other): method from_repr (line 143) | def from_repr(desc): class Shift (line 171) | class Shift(Transition): method update_state (line 172) | def update_state(self, state, model): method is_legal (line 182) | def is_legal(self, state, model): method short_name (line 221) | def short_name(self): method __repr__ (line 224) | def __repr__(self): method __eq__ (line 227) | def __eq__(self, other): method __hash__ (line 234) | def __hash__(self): class CompoundUnary (line 237) | class CompoundUnary(Transition): method __init__ (line 238) | def __init__(self, *label): method update_state (line 243) | def update_state(self, state, model): method is_legal (line 258) | def is_legal(self, state, model): method components (line 284) | def components(self): method short_name (line 287) | def short_name(self): method __repr__ (line 290) | def __repr__(self): method __eq__ (line 293) | def __eq__(self, other): method __hash__ (line 302) | def __hash__(self): class Dummy (line 305) | class Dummy(): method __init__ (line 309) | def __init__(self, label): method is_preterminal (line 312) | def is_preterminal(self): method __format__ (line 315) | def __format__(self, spec): method __str__ (line 322) | def __str__(self): method __eq__ (line 325) | def __eq__(self, other): method __hash__ (line 334) | def __hash__(self): function too_many_unary_nodes (line 337) | def too_many_unary_nodes(tree, unary_limit): class OpenConstituent (line 352) | class OpenConstituent(Transition): method __init__ (line 353) | def __init__(self, *label): method delta_opens (line 357) | def delta_opens(self): method update_state (line 360) | def update_state(self, state, model): method is_legal (line 365) | def is_legal(self, state, model): method components (line 433) | def components(self): method short_name (line 436) | def short_name(self): method __repr__ (line 439) | def __repr__(self): method __eq__ (line 442) | def __eq__(self, other): method __hash__ (line 451) | def __hash__(self): class Finalize (line 454) | class Finalize(Transition): method __init__ (line 462) | def __init__(self, *label): method update_state (line 465) | def update_state(self, state, model): method is_legal (line 483) | def is_legal(self, state, model): method short_name (line 489) | def short_name(self): method __repr__ (line 492) | def __repr__(self): method __eq__ (line 495) | def __eq__(self, other): method __hash__ (line 502) | def __hash__(self): class CloseConstituent (line 505) | class CloseConstituent(Transition): method delta_opens (line 506) | def delta_opens(self): method update_state (line 509) | def update_state(self, state, model): method build_constituents (line 533) | def build_constituents(model, data): method is_legal (line 546) | def is_legal(self, state, model): method short_name (line 603) | def short_name(self): method __repr__ (line 606) | def __repr__(self): method __eq__ (line 609) | def __eq__(self, other): method __hash__ (line 616) | def __hash__(self): function check_transitions (line 619) | def check_transitions(train_transitions, other_transitions, treebank_name): FILE: stanza/models/constituency/parse_tree.py class TreePrintMethod (line 33) | class TreePrintMethod(Enum): class Tree (line 46) | class Tree(StanzaObject): method __init__ (line 50) | def __init__(self, label=None, children=None): method is_leaf (line 60) | def is_leaf(self): method is_preterminal (line 63) | def is_preterminal(self): method yield_preterminals (line 66) | def yield_preterminals(self): method leaf_labels (line 86) | def leaf_labels(self): method __len__ (line 96) | def __len__(self): method all_leaves_are_preterminals (line 99) | def all_leaves_are_preterminals(self): method pretty_print (line 111) | def pretty_print(self, normalize=None): method __format__ (line 169) | def __format__(self, spec): method __repr__ (line 289) | def __repr__(self): method __eq__ (line 292) | def __eq__(self, other): method depth (line 305) | def depth(self): method visit_preorder (line 310) | def visit_preorder(self, internal=None, preterminal=None, leaf=None): method get_unique_constituent_labels (line 336) | def get_unique_constituent_labels(trees): method get_constituent_counts (line 346) | def get_constituent_counts(trees): method get_unique_tags (line 359) | def get_unique_tags(trees): method get_unique_words (line 372) | def get_unique_words(trees): method get_common_words (line 385) | def get_common_words(trees, num_words): method get_rare_words (line 401) | def get_rare_words(trees, threshold=0.05): method get_root_labels (line 417) | def get_root_labels(trees): method get_compound_constituents (line 421) | def get_compound_constituents(trees, separate_root=False): method simplify_labels (line 445) | def simplify_labels(self, pattern=CONSTITUENT_SPLIT): method reverse (line 458) | def reverse(self): method remap_constituent_labels (line 471) | def remap_constituent_labels(self, label_map): method remap_words (line 485) | def remap_words(self, word_map): method replace_words (line 499) | def replace_words(self, words): method replace_tags (line 520) | def replace_tags(self, tags): method prune_none (line 551) | def prune_none(self): method count_unary_depth (line 571) | def count_unary_depth(self): method write_treebank (line 587) | def write_treebank(trees, out_file, fmt="{}"): FILE: stanza/models/constituency/parser_training.py class EpochStats (line 38) | class EpochStats(namedtuple("EpochStats", ['epoch_loss', 'transitions_co... method __add__ (line 39) | def __add__(self, other): function evaluate (line 48) | def evaluate(args, model_file, retag_pipeline): function remove_optimizer (line 96) | def remove_optimizer(args, model_save_file, model_load_file): function add_grad_clipping (line 114) | def add_grad_clipping(trainer, grad_clipping): function build_trainer (line 123) | def build_trainer(args, train_trees, dev_trees, silver_trees, foundation... function train (line 201) | def train(args, model_load_file, retag_pipeline): function compose_train_data (line 263) | def compose_train_data(trees, sequences): function next_epoch_data (line 270) | def next_epoch_data(leftover_training_data, train_data, epoch_size): function update_bert_learning_rate (line 293) | def update_bert_learning_rate(args, optimizer, epochs_trained): function iterate_training (line 327) | def iterate_training(args, trainer, train_trees, train_sequences, transi... function train_model_one_epoch (line 543) | def train_model_one_epoch(epoch, trainer, transition_tensors, process_ou... function train_model_one_batch (line 568) | def train_model_one_batch(epoch, batch_idx, model, training_batch, trans... function run_dev_set (line 691) | def run_dev_set(model, retagged_trees, original_trees, args, evaluator=N... FILE: stanza/models/constituency/partitioned_transformer.py class FeatureDropoutFunction (line 16) | class FeatureDropoutFunction(torch.autograd.function.InplaceFunction): method forward (line 18) | def forward(ctx, input, p=0.5, train=False, inplace=False): method backward (line 51) | def backward(ctx, grad_output): class FeatureDropout (line 58) | class FeatureDropout(nn.Dropout): method forward (line 65) | def forward(self, x): class PartitionedReLU (line 79) | class PartitionedReLU(nn.ReLU): method forward (line 80) | def forward(self, x): class PartitionedLinear (line 88) | class PartitionedLinear(nn.Module): method __init__ (line 89) | def __init__(self, in_features, out_features, bias=True): method forward (line 94) | def forward(self, x): class PartitionedMultiHeadAttention (line 105) | class PartitionedMultiHeadAttention(nn.Module): method __init__ (line 106) | def __init__( method forward (line 123) | def forward(self, x, mask=None): class PartitionedTransformerEncoderLayer (line 147) | class PartitionedTransformerEncoderLayer(nn.Module): method __init__ (line 148) | def __init__(self, method forward (line 173) | def forward(self, x, mask=None): class PartitionedTransformerEncoder (line 185) | class PartitionedTransformerEncoder(nn.Module): method __init__ (line 186) | def __init__(self, method forward (line 208) | def forward(self, x, mask=None): class ConcatPositionalEncoding (line 214) | class ConcatPositionalEncoding(nn.Module): method __init__ (line 218) | def __init__(self, d_model=256, max_len=512): method forward (line 223) | def forward(self, x): class PartitionedTransformerModule (line 230) | class PartitionedTransformerModule(nn.Module): method __init__ (line 231) | def __init__(self, method forward (line 273) | def forward(self, attention_mask, bert_embeddings): FILE: stanza/models/constituency/positional_encoding.py class SinusoidalEncoding (line 11) | class SinusoidalEncoding(nn.Module): method __init__ (line 15) | def __init__(self, model_dim, max_len): method build_position (line 20) | def build_position(model_dim, max_len, device=None): method forward (line 30) | def forward(self, x): method max_len (line 42) | def max_len(self): class AddSinusoidalEncoding (line 46) | class AddSinusoidalEncoding(nn.Module): method __init__ (line 52) | def __init__(self, d_model=256, max_len=512): method forward (line 56) | def forward(self, x, scale=1.0): class ConcatSinusoidalEncoding (line 71) | class ConcatSinusoidalEncoding(nn.Module): method __init__ (line 77) | def __init__(self, d_model=256, max_len=512): method forward (line 81) | def forward(self, x): FILE: stanza/models/constituency/retagging.py function add_retag_args (line 34) | def add_retag_args(parser): function postprocess_args (line 46) | def postprocess_args(args): function build_retag_pipeline (line 64) | def build_retag_pipeline(args): FILE: stanza/models/constituency/score_converted_dependencies.py function score_converted_dependencies (line 19) | def score_converted_dependencies(args): function main (line 48) | def main(): FILE: stanza/models/constituency/state.py class State (line 3) | class State(namedtuple('State', ['word_queue', 'transitions', 'constitue... method empty_word_queue (line 33) | def empty_word_queue(self): method empty_transitions (line 38) | def empty_transitions(self): method has_one_constituent (line 43) | def has_one_constituent(self): method empty_constituents (line 48) | def empty_constituents(self): method num_constituents (line 51) | def num_constituents(self): method num_transitions (line 55) | def num_transitions(self): method get_word (line 59) | def get_word(self, pos): method finished (line 64) | def finished(self, model): method get_tree (line 67) | def get_tree(self, model): method all_transitions (line 70) | def all_transitions(self, model): method all_constituents (line 79) | def all_constituents(self, model): method all_words (line 88) | def all_words(self, model): method to_string (line 91) | def to_string(self, model): method __str__ (line 94) | def __str__(self): class MultiState (line 97) | class MultiState(namedtuple('MultiState', ['states', 'gold_tree', 'gold_... method finished (line 98) | def finished(self, ensemble): method get_tree (line 101) | def get_tree(self, ensemble): method empty_constituents (line 105) | def empty_constituents(self): method num_constituents (line 108) | def num_constituents(self): method num_transitions (line 112) | def num_transitions(self): method num_opens (line 117) | def num_opens(self): method sentence_length (line 121) | def sentence_length(self): method empty_word_queue (line 124) | def empty_word_queue(self): method empty_transitions (line 127) | def empty_transitions(self): method constituents (line 131) | def constituents(self): method transitions (line 139) | def transitions(self): FILE: stanza/models/constituency/text_processing.py function read_tokenized_file (line 14) | def read_tokenized_file(tokenized_file): function read_xml_tree_file (line 26) | def read_xml_tree_file(tree_file): function parse_tokenized_sentences (line 76) | def parse_tokenized_sentences(args, model, retag_pipeline, sentences): function parse_text (line 88) | def parse_text(args, model, retag_pipeline, tokenized_file=None, predict... function parse_dir (line 133) | def parse_dir(args, model, retag_pipeline, tokenized_dir, predict_dir): function load_model_parse_text (line 142) | def load_model_parse_text(args, model_file, retag_pipeline): FILE: stanza/models/constituency/top_down_oracle.py function find_constituent_end (line 7) | def find_constituent_end(gold_sequence, cur_index): function fix_shift_close (line 22) | def fix_shift_close(gold_transition, pred_transition, gold_sequence, gol... function fix_open_close (line 42) | def fix_open_close(gold_transition, pred_transition, gold_sequence, gold... function fix_one_open_shift (line 61) | def fix_one_open_shift(gold_transition, pred_transition, gold_sequence, ... function fix_multiple_open_shift (line 93) | def fix_multiple_open_shift(gold_transition, pred_transition, gold_seque... function fix_nested_open_constituent (line 131) | def fix_nested_open_constituent(gold_transition, pred_transition, gold_s... function fix_shift_open_immediate_close (line 162) | def fix_shift_open_immediate_close(gold_transition, pred_transition, gol... function fix_shift_open_ambiguous_unary (line 186) | def fix_shift_open_ambiguous_unary(gold_transition, pred_transition, gol... function fix_shift_open_ambiguous_later (line 209) | def fix_shift_open_ambiguous_later(gold_transition, pred_transition, gol... function fix_shift_open_ambiguous_predicted (line 234) | def fix_shift_open_ambiguous_predicted(gold_transition, pred_transition,... function fix_close_shift_ambiguous_immediate (line 268) | def fix_close_shift_ambiguous_immediate(gold_transition, pred_transition... function fix_close_shift_ambiguous_later (line 298) | def fix_close_shift_ambiguous_later(gold_transition, pred_transition, go... function fix_close_shift (line 331) | def fix_close_shift(gold_transition, pred_transition, gold_sequence, gol... function fix_close_shift_with_opens (line 387) | def fix_close_shift_with_opens(*args, **kwargs): function fix_close_next_correct_predicted (line 390) | def fix_close_next_correct_predicted(gold_transition, pred_transition, g... function fix_close_open_correct_open (line 428) | def fix_close_open_correct_open(gold_transition, pred_transition, gold_s... function fix_close_open_correct_open_ambiguous_immediate (line 466) | def fix_close_open_correct_open_ambiguous_immediate(*args, **kwargs): function fix_close_open_correct_open_ambiguous_later (line 469) | def fix_close_open_correct_open_ambiguous_later(gold_transition, pred_tr... function fix_open_open_ambiguous_unary (line 487) | def fix_open_open_ambiguous_unary(gold_transition, pred_transition, gold... function fix_open_open_ambiguous_later (line 509) | def fix_open_open_ambiguous_later(gold_transition, pred_transition, gold... function fix_open_open_ambiguous_random (line 532) | def fix_open_open_ambiguous_random(gold_transition, pred_transition, gol... function report_shift_open (line 557) | def report_shift_open(gold_transition, pred_transition, gold_sequence, g... function report_close_shift (line 566) | def report_close_shift(gold_transition, pred_transition, gold_sequence, ... function report_close_open (line 574) | def report_close_open(gold_transition, pred_transition, gold_sequence, g... function report_open_open (line 582) | def report_open_open(gold_transition, pred_transition, gold_sequence, go... class RepairType (line 591) | class RepairType(Enum): method __new__ (line 675) | def __new__(cls, fn, correct=False, debug=False): method is_correct (line 688) | def is_correct(self): class TopDownOracle (line 755) | class TopDownOracle(DynamicOracle): method __init__ (line 756) | def __init__(self, root_labels, oracle_level, additional_oracle_levels... FILE: stanza/models/constituency/trainer.py class Trainer (line 30) | class Trainer(BaseTrainer): method __init__ (line 36) | def __init__(self, model, optimizer=None, scheduler=None, epochs_train... method save (line 39) | def save(self, filename, save_optimizer=True): method get_peft_params (line 45) | def get_peft_params(self): method model_type (line 53) | def model_type(self): method find_and_load_pretrain (line 57) | def find_and_load_pretrain(saved_args, foundation_cache): method find_and_load_charlm (line 68) | def find_and_load_charlm(charlm_file, direction, saved_args, foundatio... method log_num_words_known (line 79) | def log_num_words_known(self, words): method load_optimizer (line 83) | def load_optimizer(model, checkpoint, first_optimizer, filename): method load_scheduler (line 95) | def load_scheduler(model, optimizer, checkpoint, first_optimizer): method model_from_params (line 102) | def model_from_params(params, peft_params, args, foundation_cache=None... method build_trainer (line 206) | def build_trainer(args, train_transitions, train_constituents, tags, w... FILE: stanza/models/constituency/transformer_tree_stack.py class TransformerTreeStack (line 20) | class TransformerTreeStack(nn.Module): method __init__ (line 21) | def __init__(self, input_size, output_size, input_dropout, length_limi... method attention (line 52) | def attention(self, key, query, value, mask=None): method initial_state (line 105) | def initial_state(self, initial_value=None): method push_states (line 131) | def push_states(self, stacks, values, inputs): method output (line 192) | def output(self, stack): FILE: stanza/models/constituency/transition_sequence.py function yield_top_down_sequence (line 18) | def yield_top_down_sequence(tree, transition_scheme=TransitionScheme.TOP... function yield_in_order_sequence (line 59) | def yield_in_order_sequence(tree): function yield_in_order_compound_sequence (line 83) | def yield_in_order_compound_sequence(tree, transition_scheme): function build_sequence (line 127) | def build_sequence(tree, transition_scheme=TransitionScheme.TOP_DOWN_UNA... function build_treebank (line 139) | def build_treebank(trees, transition_scheme=TransitionScheme.TOP_DOWN_UN... function all_transitions (line 148) | def all_transitions(transition_lists): function convert_trees_to_sequences (line 157) | def convert_trees_to_sequences(trees, treebank_name, transition_scheme, ... function main (line 172) | def main(): FILE: stanza/models/constituency/tree_embedding.py class TreeEmbedding (line 16) | class TreeEmbedding(nn.Module): method __init__ (line 17) | def __init__(self, constituency_parser, args): method embed_trees (line 53) | def embed_trees(self, inputs): method forward (line 96) | def forward(self, inputs): method get_norms (line 99) | def get_norms(self): method get_params (line 107) | def get_params(self, skip_modules=True): method from_parser_file (line 125) | def from_parser_file(args, foundation_cache=None): method model_from_params (line 130) | def model_from_params(params, args, foundation_cache=None): FILE: stanza/models/constituency/tree_reader.py class UnclosedTreeError (line 26) | class UnclosedTreeError(ValueError): method __init__ (line 30) | def __init__(self, line_num): class ExtraCloseTreeError (line 34) | class ExtraCloseTreeError(ValueError): method __init__ (line 38) | def __init__(self, line_num): class UnlabeledTreeError (line 42) | class UnlabeledTreeError(ValueError): method __init__ (line 48) | def __init__(self, line_num): class MixedTreeError (line 52) | class MixedTreeError(ValueError): method __init__ (line 56) | def __init__(self, line_num, child_label, children): function normalize (line 62) | def normalize(text): function read_single_tree (line 65) | def read_single_tree(token_iterator, broken_ok): class TokenIterator (line 120) | class TokenIterator: method __init__ (line 128) | def __init__(self): method set_mark (line 133) | def set_mark(self): method get_mark (line 139) | def get_mark(self): method __iter__ (line 144) | def __iter__(self): method __next__ (line 147) | def __next__(self): class TextTokenIterator (line 167) | class TextTokenIterator(TokenIterator): method __init__ (line 168) | def __init__(self, text, use_tqdm=True): class FileTokenIterator (line 179) | class FileTokenIterator(TokenIterator): method __init__ (line 180) | def __init__(self, filename): method __enter__ (line 184) | def __enter__(self): method __exit__ (line 197) | def __exit__(self, exc_type, exc_value, exc_tb): function read_token_iterator (line 201) | def read_token_iterator(token_iterator, broken_ok, tree_callback): function read_trees (line 224) | def read_trees(text, broken_ok=False, tree_callback=None, use_tqdm=True): function read_tree_file (line 233) | def read_tree_file(filename, broken_ok=False, tree_callback=None): function read_directory (line 241) | def read_directory(dirname, broken_ok=False, tree_callback=None): function read_treebank (line 251) | def read_treebank(filename, tree_callback=None): function main (line 265) | def main(): FILE: stanza/models/constituency/tree_stack.py class TreeStack (line 7) | class TreeStack(namedtuple('TreeStack', ['value', 'parent', 'length'])): method pop (line 34) | def pop(self): method push (line 37) | def push(self, value): method __iter__ (line 41) | def __iter__(self): method __reversed__ (line 48) | def __reversed__(self): method __str__ (line 53) | def __str__(self): method __len__ (line 56) | def __len__(self): FILE: stanza/models/constituency/utils.py function retag_tags (line 44) | def retag_tags(doc, pipelines, xpos): function retag_trees (line 65) | def retag_trees(trees, pipelines, xpos=True): function build_optimizer (line 105) | def build_optimizer(args, model, build_simple_adadelta=False): function build_scheduler (line 152) | def build_scheduler(args, optimizer, first_optimizer=False): function initialize_linear (line 177) | def initialize_linear(linear, nonlinearity, bias): function add_predict_output_args (line 185) | def add_predict_output_args(parser): function postprocess_predict_output_args (line 195) | def postprocess_predict_output_args(args): function get_open_nodes (line 200) | def get_open_nodes(trees, transition_scheme): function verify_transitions (line 213) | def verify_transitions(trees, sequences, transition_scheme, unary_limit,... function check_constituents (line 237) | def check_constituents(train_constituents, trees, treebank_name, fail=Tr... function check_root_labels (line 258) | def check_root_labels(root_labels, other_trees, treebank_name): function remove_duplicate_trees (line 266) | def remove_duplicate_trees(trees, treebank_name): function remove_singleton_trees (line 282) | def remove_singleton_trees(trees): FILE: stanza/models/constituency_parser.py function build_argparse (line 185) | def build_argparse(): function build_model_filename (line 755) | def build_model_filename(args): function parse_args (line 790) | def parse_args(args=None): function main (line 882) | def main(args=None): FILE: stanza/models/coref/anaphoricity_scorer.py class AnaphoricityScorer (line 10) | class AnaphoricityScorer(torch.nn.Module): method __init__ (line 12) | def __init__(self, method forward (line 38) | def forward(self, *, # type: ignore # pylint: disable=arguments-diff... method _ffnn (line 71) | def _ffnn(self, x: torch.Tensor) -> torch.Tensor: method _get_pair_matrix (line 92) | def _get_pair_matrix(mentions_batch: torch.Tensor, FILE: stanza/models/coref/bert.py function get_subwords_batches (line 15) | def get_subwords_batches(doc: Doc, FILE: stanza/models/coref/cluster_checker.py class ClusterChecker (line 15) | class ClusterChecker: method __init__ (line 19) | def __init__(self): method _f1 (line 39) | def _f1(p,r): method add_predictions (line 42) | def add_predictions(self, method bakeoff (line 87) | def bakeoff(self): method mbc (line 92) | def mbc(self): method total_lea (line 105) | def total_lea(self): method _lea (line 114) | def _lea(key: List[List[Hashable]], method _muc (line 139) | def _muc(key: List[List[Hashable]], method _b3 (line 177) | def _b3(key: List[List[Hashable]], method _phi4 (line 202) | def _phi4(c1, c2): method _ceafe (line 206) | def _ceafe(clusters: List[List[Hashable]], gold_clusters: List[List[Ha... FILE: stanza/models/coref/config.py class Config (line 11) | class Config: # pylint: disable=too-many-instance-attributes, too-few-p... FILE: stanza/models/coref/conll.py function write_conll (line 14) | def write_conll(doc: Doc, function open_ (line 93) | def open_(config: Config, epochs: int, data_split: str): FILE: stanza/models/coref/const.py class CorefResult (line 17) | class CorefResult: FILE: stanza/models/coref/coref_chain.py class CorefMention (line 8) | class CorefMention: method __init__ (line 9) | def __init__(self, sentence, start_word, end_word): class CorefChain (line 14) | class CorefChain: method __init__ (line 15) | def __init__(self, index, mentions, representative_text, representativ... class CorefAttachment (line 21) | class CorefAttachment: method __init__ (line 22) | def __init__(self, chain, is_start, is_end, is_representative): method to_json (line 28) | def to_json(self): FILE: stanza/models/coref/dataset.py class CorefDataset (line 9) | class CorefDataset(Dataset): method __init__ (line 11) | def __init__(self, path, config, tokenizer): method avg_span (line 62) | def avg_span(self): method __getitem__ (line 65) | def __getitem__(self, x): method __len__ (line 68) | def __len__(self): FILE: stanza/models/coref/loss.py class CorefLoss (line 7) | class CorefLoss(torch.nn.Module): method __init__ (line 13) | def __init__(self, bce_weight: float): method forward (line 19) | def forward(self, # type: ignore # pylint: disable=arguments-diffe... method _bce (line 26) | def _bce(self, method _nlml (line 34) | def _nlml(input_: torch.Tensor, target: torch.Tensor) -> torch.Tensor: FILE: stanza/models/coref/model.py class CorefModel (line 49) | class CorefModel: # pylint: disable=too-many-instance-attributes method __init__ (line 69) | def __init__(self, method training (line 105) | def training(self) -> bool: method training (line 110) | def training(self, new_value: bool): method evaluate (line 118) | def evaluate(self, method load_weights (line 218) | def load_weights(self, method load_state_dicts (line 264) | def load_state_dicts(self, method build_doc (line 289) | def build_doc(self, doc: dict) -> dict: method load_model (line 319) | def load_model(path: str, method run (line 352) | def run(self, # pylint: disable=too-many-locals method save_weights (line 426) | def save_weights(self, save_path=None, save_optimizers=True): method log_norms (line 454) | def log_norms(self): method train (line 463) | def train(self, log=False): method _bertify (line 623) | def _bertify(self, doc: Doc) -> torch.Tensor: method _build_model (line 663) | def _build_model(self, foundation_cache): method disable_zeros_predictor (line 711) | def disable_zeros_predictor(self): method _build_optimizers (line 715) | def _build_optimizers(self): method _clusterize (line 758) | def _clusterize(self, doc: Doc, scores: torch.Tensor, top_indices: tor... method _get_docs (line 802) | def _get_docs(self, path: str) -> List[Doc]: method _get_ground_truth (line 808) | def _get_ground_truth(cluster_ids: torch.Tensor, method _load_config (line 862) | def _load_config(config_path: str, method _set_training (line 874) | def _set_training(self, value: bool): FILE: stanza/models/coref/pairwise_encoder.py class PairwiseEncoder (line 12) | class PairwiseEncoder(torch.nn.Module): method __init__ (line 19) | def __init__(self, config: Config): method device (line 45) | def device(self) -> torch.device: method forward (line 50) | def forward(self, # type: ignore # pylint: disable=arguments-differ ... method _speaker_map (line 74) | def _speaker_map(doc: Doc) -> List[int]: FILE: stanza/models/coref/rough_scorer.py class RoughScorer (line 12) | class RoughScorer(torch.nn.Module): method __init__ (line 18) | def __init__(self, features: int, config: Config): method forward (line 25) | def forward(self, # type: ignore # pylint: disable=arguments-differ ... method _prune (line 44) | def _prune(self, FILE: stanza/models/coref/span_predictor.py class SpanPredictor (line 11) | class SpanPredictor(torch.nn.Module): method __init__ (line 12) | def __init__(self, input_size: int, distance_emb_size: int): method device (line 30) | def device(self) -> torch.device: method forward (line 35) | def forward(self, # type: ignore # pylint: disable=arguments-differ ... method get_training_data (line 96) | def get_training_data(self, method predict (line 111) | def predict(self, FILE: stanza/models/coref/utils.py class GraphNode (line 11) | class GraphNode: method __init__ (line 12) | def __init__(self, node_id: int): method link (line 17) | def link(self, another: "GraphNode"): method __repr__ (line 21) | def __repr__(self) -> str: function add_dummy (line 25) | def add_dummy(tensor: torch.Tensor, eps: bool = False): function sigmoid_focal_loss (line 38) | def sigmoid_focal_loss( FILE: stanza/models/coref/word_encoder.py class WordEncoder (line 12) | class WordEncoder(torch.nn.Module): # pylint: disable=too-many-instance... method __init__ (line 16) | def __init__(self, features: int, config: Config): method device (line 27) | def device(self) -> torch.device: method forward (line 32) | def forward(self, # type: ignore # pylint: disable=arguments-differ ... method _attn_scores (line 60) | def _attn_scores(self, method _cluster_ids (line 98) | def _cluster_ids(self, doc: Doc) -> torch.Tensor: FILE: stanza/models/depparse/data.py function data_to_batches (line 15) | def data_to_batches(data, batch_size, eval_mode, sort_during_eval, min_l... class DataLoader (line 65) | class DataLoader: method __init__ (line 67) | def __init__(self, doc, batch_size, args, pretrain, vocab=None, evalua... method init_vocab (line 108) | def init_vocab(self, data): method preprocess (line 127) | def preprocess(self, data, vocab, pretrain_vocab, args): method __len__ (line 149) | def __len__(self): method __getitem__ (line 152) | def __getitem__(self, key): method load_doc (line 192) | def load_doc(self, doc): method resolve_none (line 198) | def resolve_none(self, data): method __iter__ (line 207) | def __iter__(self): method set_batch_size (line 211) | def set_batch_size(self, batch_size): method reshuffle (line 214) | def reshuffle(self): method chunk_batches (line 219) | def chunk_batches(self, data): function to_int (line 227) | def to_int(string, ignore_error=False): FILE: stanza/models/depparse/model.py class Parser (line 22) | class Parser(nn.Module): method __init__ (line 23) | def __init__(self, args, vocab, emb_matrix=None, foundation_cache=None... method add_unsaved_module (line 131) | def add_unsaved_module(self, name, module): method log_norms (line 135) | def log_norms(self): method forward (line 138) | def forward(self, word, word_mask, wordchars, wordchars_mask, upos, xp... FILE: stanza/models/depparse/scorer.py function score_named_dependencies (line 12) | def score_named_dependencies(pred_doc, gold_doc, output_latex=False): function score (line 64) | def score(system_conllu_file, gold_conllu_file, verbose=True): FILE: stanza/models/depparse/trainer.py function unpack_batch (line 27) | def unpack_batch(batch, device): class Trainer (line 37) | class Trainer(BaseTrainer): method __init__ (line 39) | def __init__(self, args=None, vocab=None, pretrain=None, model_file=None, method __init_optim (line 87) | def __init_optim(self): method update (line 121) | def update(self, batch, eval=False): method predict (line 145) | def predict(self, batch, unsort=True): method save (line 164) | def save(self, filename, skip_modules=True, save_optimizer=False): method load (line 194) | def load(self, filename, pretrain, args=None, foundation_cache=None, d... FILE: stanza/models/identity_lemmatizer.py function parse_args (line 19) | def parse_args(args=None): function main (line 36) | def main(args=None): FILE: stanza/models/lang_identifier.py function parse_args (line 22) | def parse_args(args=None): function randomize_lengths_range (line 45) | def randomize_lengths_range(range_list): function main (line 54) | def main(args=None): function build_indexes (line 63) | def build_indexes(args): function train_model (line 85) | def train_model(args): function score_log_path (line 141) | def score_log_path(file_path): function eval_model (line 153) | def eval_model(args): function eval_trainer (line 178) | def eval_trainer(trainer, dev_data, batch_mode=False, fine_grained=True): FILE: stanza/models/langid/create_ud_data.py function parse_args (line 33) | def parse_args(args=None): function splits_from_list (line 48) | def splits_from_list(value_list): function main (line 52) | def main(args=None): function collect_files (line 70) | def collect_files(ud_path, languages, data_format="ud"): function generate_examples (line 93) | def generate_examples(lang_id, list_of_files, splits=(0.8,0.1,0.1), min_... function sentences_from_file (line 114) | def sentences_from_file(ud_file_path, data_format="ud"): function sentence_to_windows (line 130) | def sentence_to_windows(sentence, min_window, max_window): function validate_sentence (line 151) | def validate_sentence(current_window, min_window): function find (line 160) | def find(s, ch): function clean_sentence (line 168) | def clean_sentence(line): function example_json (line 202) | def example_json(lang_id, text, eval_length=None): FILE: stanza/models/langid/data.py class DataLoader (line 6) | class DataLoader: method __init__ (line 17) | def __init__(self, device=None): method load_data (line 25) | def load_data(self, batch_size, data_files, char_index, tag_index, ran... method randomize_data (line 100) | def randomize_data(sentences, upper_lim=20, lower_lim=5): method build_batch_tensors (line 121) | def build_batch_tensors(self, batch): method next (line 132) | def next(self): FILE: stanza/models/langid/model.py class LangIDBiLSTM (line 7) | class LangIDBiLSTM(nn.Module): method __init__ (line 18) | def __init__(self, char_to_idx, tag_to_idx, num_layers, embedding_dim,... method build_lang_mask (line 60) | def build_lang_mask(self, device): method loss (line 72) | def loss(self, Y_hat, Y): method forward (line 75) | def forward(self, x): method prediction_scores (line 90) | def prediction_scores(self, x): method save (line 98) | def save(self, path): method load (line 111) | def load(cls, path, device=None, batch_size=64, lang_subset=None): FILE: stanza/models/langid/trainer.py class Trainer (line 7) | class Trainer: method __init__ (line 14) | def __init__(self, config, load_model=False, device=None): method update (line 27) | def update(self, inputs): method predict (line 36) | def predict(self, inputs): method save (line 41) | def save(self, label=None): method load (line 47) | def load(self, model_path=None, device=None): FILE: stanza/models/lemma/attach_lemma_classifier.py function attach_classifier (line 6) | def attach_classifier(input_filename, output_filename, classifiers): function main (line 15) | def main(args=None): FILE: stanza/models/lemma/data.py class DataLoader (line 17) | class DataLoader: method __init__ (line 18) | def __init__(self, doc, batch_size, args, vocab=None, evaluation=False... method init_vocab (line 66) | def init_vocab(self, data): method preprocess (line 74) | def preprocess(self, data, char_vocab, pos_vocab, args): method __len__ (line 89) | def __len__(self): method __getitem__ (line 92) | def __getitem__(self, key): method __iter__ (line 119) | def __iter__(self): method raw_data (line 123) | def raw_data(self): method load_doc (line 127) | def load_doc(doc, caseless, skip_blank_lemmas, evaluation): method extract_correct_forms (line 142) | def extract_correct_forms(data): method remove_goeswith (line 180) | def remove_goeswith(data): method lowercase_data (line 202) | def lowercase_data(data): method skip_blank_lemmas (line 208) | def skip_blank_lemmas(data): method resolve_none (line 213) | def resolve_none(data): FILE: stanza/models/lemma/edit.py function get_edit_type (line 7) | def get_edit_type(word, lemma): function edit_word (line 15) | def edit_word(word, pred, edit_id): FILE: stanza/models/lemma/scorer.py function score (line 11) | def score(system_conllu_file, gold_conllu_file): FILE: stanza/models/lemma/trainer.py function unpack_batch (line 26) | def unpack_batch(batch, device): class Trainer (line 33) | class Trainer(object): method __init__ (line 35) | def __init__(self, args=None, vocab=None, emb_matrix=None, model_file=... method build_seq2seq (line 63) | def build_seq2seq(self, args, emb_matrix, foundation_cache): method update (line 78) | def update(self, batch, eval=False): method predict (line 104) | def predict(self, batch, beam_size=1, vocab=None): method postprocess (line 127) | def postprocess(self, words, preds, edits=None): method has_contextual_lemmatizers (line 148) | def has_contextual_lemmatizers(self): method predict_contextual (line 151) | def predict_contextual(self, sentence_words, sentence_tags, preds): method update_contextual_preds (line 175) | def update_contextual_preds(self, doc, preds): method update_lr (line 198) | def update_lr(self, new_lr): method train_dict (line 201) | def train_dict(self, triples, update_word_dict=True): method predict_dict (line 221) | def predict_dict(self, pairs): method skip_seq2seq (line 236) | def skip_seq2seq(self, pairs): method ensemble (line 252) | def ensemble(self, pairs, other_preds): method save (line 271) | def save(self, filename, skip_modules=True): method load (line 295) | def load(self, filename, args, foundation_cache, lemma_classifier_args... FILE: stanza/models/lemma/vocab.py class Vocab (line 6) | class Vocab(BaseVocab): method build_vocab (line 7) | def build_vocab(self): class MultiVocab (line 12) | class MultiVocab(BaseMultiVocab): method load_state_dict (line 14) | def load_state_dict(cls, state_dict): FILE: stanza/models/lemma_classifier/base_model.py class LemmaClassifier (line 23) | class LemmaClassifier(ABC, nn.Module): method __init__ (line 24) | def __init__(self, label_decoder, target_words, target_upos, *args, **... method add_unsaved_module (line 33) | def add_unsaved_module(self, name, module): method is_unsaved_module (line 37) | def is_unsaved_module(self, name): method save (line 40) | def save(self, save_name): method model_type (line 52) | def model_type(self): method target_indices (line 57) | def target_indices(self, words, tags): method predict (line 60) | def predict(self, position_indices: torch.Tensor, sentences: List[List... method from_checkpoint (line 69) | def from_checkpoint(checkpoint, args=None): method load (line 125) | def load(filename, args=None): FILE: stanza/models/lemma_classifier/base_trainer.py class BaseLemmaClassifierTrainer (line 20) | class BaseLemmaClassifierTrainer(ABC): method configure_weighted_loss (line 21) | def configure_weighted_loss(self, label_decoder: Mapping, counts: Mapp... method build_model (line 36) | def build_model(self, label_decoder, upos_to_id, known_words, target_w... method train (line 41) | def train(self, num_epochs: int, save_name: str, args: Mapping, eval_f... FILE: stanza/models/lemma_classifier/baseline_model.py class BaselineModel (line 12) | class BaselineModel: method __init__ (line 14) | def __init__(self, token_to_lemmatize, prediction_lemma, prediction_up... method predict (line 19) | def predict(self, token): method evaluate (line 23) | def evaluate(self, conll_path): FILE: stanza/models/lemma_classifier/constants.py class ModelType (line 8) | class ModelType(Enum): FILE: stanza/models/lemma_classifier/evaluate_many.py function evaluate_n_models (line 13) | def evaluate_n_models(path_to_models_dir, args): function main (line 45) | def main(): FILE: stanza/models/lemma_classifier/evaluate_models.py function get_weighted_f1 (line 35) | def get_weighted_f1(mcc_results: Mapping[int, Mapping[str, float]], conf... function evaluate_sequences (line 54) | def evaluate_sequences(gold_tag_sequences: List[Any], pred_tag_sequences... function model_predict (line 111) | def model_predict(model: nn.Module, position_indices: torch.Tensor, sent... function evaluate_model (line 130) | def evaluate_model(model: nn.Module, eval_path: str, verbose: bool = Tru... function main (line 183) | def main(args=None, predefined_args=None): FILE: stanza/models/lemma_classifier/lstm_model.py class LemmaClassifierLSTM (line 17) | class LemmaClassifierLSTM(LemmaClassifier): method __init__ (line 24) | def __init__(self, model_args, output_dim, pt_embedding, label_decoder... method get_save_dict (line 109) | def get_save_dict(self): method convert_tags (line 125) | def convert_tags(self, upos_tags: List[List[str]]): method forward (line 130) | def forward(self, pos_indices: List[int], sentences: List[List[str]], ... method model_type (line 218) | def model_type(self): FILE: stanza/models/lemma_classifier/prepare_dataset.py function load_doc_from_conll_file (line 17) | def load_doc_from_conll_file(path: str): class DataProcessor (line 24) | class DataProcessor(): method __init__ (line 26) | def __init__(self, target_word: str, target_upos: List[str], allowed_l... method keep_sentence (line 32) | def keep_sentence(self, sentence): method find_all_occurrences (line 38) | def find_all_occurrences(self, sentence) -> List[int]: method write_output_file (line 49) | def write_output_file(save_name, target_upos, sentences): method process_document (line 64) | def process_document(self, doc, save_name: str) -> None: function main (line 99) | def main(args=None): FILE: stanza/models/lemma_classifier/train_lstm_model.py class LemmaClassifierTrainer (line 19) | class LemmaClassifierTrainer(BaseLemmaClassifierTrainer): method __init__ (line 24) | def __init__(self, model_args: dict, embedding_file: str, use_charlm: ... method build_model (line 75) | def build_model(self, label_decoder, upos_to_id, known_words, target_w... function build_argparse (line 79) | def build_argparse(): function main (line 100) | def main(args=None, predefined_args=None): FILE: stanza/models/lemma_classifier/train_many.py function train_n_models (line 19) | def train_n_models(num_models: int, base_path: str, args): function train_n_tfmrs (line 83) | def train_n_tfmrs(num_models: int, base_path: str, args): function main (line 112) | def main(): FILE: stanza/models/lemma_classifier/train_transformer_model.py class TransformerBaselineTrainer (line 21) | class TransformerBaselineTrainer(BaseLemmaClassifierTrainer): method __init__ (line 27) | def __init__(self, model_args: dict, transformer_name: str = "roberta"... method set_layer_learning_rates (line 53) | def set_layer_learning_rates(self, transformer_lr: float, mlp_lr: floa... method build_model (line 75) | def build_model(self, label_decoder, upos_to_id, known_words, target_w... function main (line 79) | def main(args=None, predefined_args=None): FILE: stanza/models/lemma_classifier/transformer_model.py class LemmaClassifierWithTransformer (line 16) | class LemmaClassifierWithTransformer(LemmaClassifier): method __init__ (line 17) | def __init__(self, model_args: dict, output_dim: int, transformer_name... method get_save_dict (line 50) | def get_save_dict(self): method convert_tags (line 64) | def convert_tags(self, upos_tags: List[List[str]]): method forward (line 67) | def forward(self, idx_positions: List[int], sentences: List[List[str]]... method model_type (line 88) | def model_type(self): FILE: stanza/models/lemma_classifier/utils.py class Dataset (line 15) | class Dataset: method __init__ (line 16) | def __init__(self, data_path: str, batch_size: int =DEFAULT_BATCH_SIZE... method __len__ (line 103) | def __len__(self): method __iter__ (line 109) | def __iter__(self): function extract_unknown_token_indices (line 124) | def extract_unknown_token_indices(tokenized_indices: torch.tensor, unkno... function get_device (line 138) | def get_device(): function round_up_to_multiple (line 152) | def round_up_to_multiple(number, multiple): function main (line 168) | def main(): FILE: stanza/models/lemmatizer.py function build_argparse (line 33) | def build_argparse(): function parse_args (line 90) | def parse_args(args=None): function main (line 103) | def main(args=None): function all_lowercase (line 115) | def all_lowercase(doc): function build_model_filename (line 122) | def build_model_filename(args): function train (line 133) | def train(args): function evaluate (line 259) | def evaluate(args): FILE: stanza/models/mwt/character_classifier.py class CharacterClassifier (line 14) | class CharacterClassifier(nn.Module): method __init__ (line 15) | def __init__(self, args): method encode (line 43) | def encode(self, enc_inputs, lens): method embed (line 49) | def embed(self, src, src_mask): method forward (line 60) | def forward(self, src, src_mask): FILE: stanza/models/mwt/data.py class DataLoader (line 30) | class DataLoader: method __init__ (line 31) | def __init__(self, doc, batch_size, args, vocab=None, evaluation=False... method init_vocab (line 67) | def init_vocab(self, data): method maybe_augment_apos (line 72) | def maybe_augment_apos(self, datum): method process (line 81) | def process(self, sample): method prepare_target (line 91) | def prepare_target(self, vocab, datum): method __len__ (line 100) | def __len__(self): method __getitem__ (line 103) | def __getitem__(self, key): method __collate_fn (line 121) | def __collate_fn(data): method __iter__ (line 143) | def __iter__(self): method to_loader (line 147) | def to_loader(self): method load_doc (line 157) | def load_doc(self, doc, evaluation=False): class BinaryDataLoader (line 162) | class BinaryDataLoader(DataLoader): method prepare_target (line 168) | def prepare_target(self, vocab, datum): FILE: stanza/models/mwt/scorer.py function score (line 6) | def score(system_conllu_file, gold_conllu_file): FILE: stanza/models/mwt/trainer.py function unpack_batch (line 22) | def unpack_batch(batch, device): class Trainer (line 29) | class Trainer(BaseTrainer): method __init__ (line 31) | def __init__(self, args=None, vocab=None, emb_matrix=None, model_file=... method update (line 53) | def update(self, batch, eval=False): method predict (line 84) | def predict(self, batch, unsort=True, never_decode_unk=False, vocab=No... method train_dict (line 125) | def train_dict(self, pairs): method dict_expansion (line 139) | def dict_expansion(self, word): method predict_dict (line 163) | def predict_dict(self, words): method ensemble (line 174) | def ensemble(self, cands, other_preds): method save (line 186) | def save(self, filename): method load (line 199) | def load(self, filename): FILE: stanza/models/mwt/utils.py function mwts_composed_of_words (line 7) | def mwts_composed_of_words(doc): function resplit_mwt (line 20) | def resplit_mwt(tokens, pipeline, keep_tokens=True): function main (line 82) | def main(): FILE: stanza/models/mwt/vocab.py class Vocab (line 6) | class Vocab(BaseVocab): method build_vocab (line 7) | def build_vocab(self): method add_unit (line 15) | def add_unit(self, unit): FILE: stanza/models/mwt_expander.py function build_argparse (line 40) | def build_argparse(): function parse_args (line 90) | def parse_args(args=None): function main (line 99) | def main(args=None): function train (line 112) | def train(args): function evaluate (line 276) | def evaluate(args): FILE: stanza/models/ner/data.py class DataLoader (line 15) | class DataLoader: method __init__ (line 16) | def __init__(self, doc, batch_size, args, pretrain=None, vocab=None, e... method init_vocab (line 55) | def init_vocab(self, data): method preprocess (line 93) | def preprocess(self, data, vocab, args): method __len__ (line 106) | def __len__(self): method __getitem__ (line 109) | def __getitem__(self, key): method __iter__ (line 150) | def __iter__(self): method _load_doc (line 154) | def _load_doc(self, doc, scheme): method process_chars (line 165) | def process_chars(self, sents): method reshuffle (line 190) | def reshuffle(self): method chunk_batches (line 195) | def chunk_batches(self, data): FILE: stanza/models/ner/model.py class NERTagger (line 25) | class NERTagger(nn.Module): method __init__ (line 26) | def __init__(self, args, vocab, emb_matrix=None, foundation_cache=None... method init_emb (line 131) | def init_emb(self, emb_matrix): method add_unsaved_module (line 140) | def add_unsaved_module(self, name, module): method log_norms (line 144) | def log_norms(self): method forward (line 151) | def forward(self, sentences, wordchars, wordchars_mask, tags, word_ori... method extract_static_embeddings (line 281) | def extract_static_embeddings(args, sents, vocab): FILE: stanza/models/ner/scorer.py function score_by_entity (line 13) | def score_by_entity(pred_tag_sequences, gold_tag_sequences, verbose=True... function score_by_token (line 89) | def score_by_token(pred_tag_sequences, gold_tag_sequences, verbose=True,... function test (line 161) | def test(): FILE: stanza/models/ner/trainer.py function unpack_batch (line 22) | def unpack_batch(batch, device): function fix_singleton_tags (line 35) | def fix_singleton_tags(tags): class Trainer (line 63) | class Trainer(BaseTrainer): method __init__ (line 65) | def __init__(self, args=None, vocab=None, pretrain=None, model_file=No... method update (line 117) | def update(self, batch, eval=False): method predict (line 137) | def predict(self, batch, unsort=True): method save (line 176) | def save(self, filename, skip_modules=True): method load (line 200) | def load(self, filename, pretrain=None, args=None, foundation_cache=No... method get_known_tags (line 258) | def get_known_tags(self): FILE: stanza/models/ner/utils.py function is_basic_scheme (line 14) | def is_basic_scheme(all_tags): function is_bio_scheme (line 30) | def is_bio_scheme(all_tags): function to_bio2 (line 49) | def to_bio2(tags): function basic_to_bio (line 73) | def basic_to_bio(tags): function bio2_to_bioes (line 95) | def bio2_to_bioes(tags): function normalize_empty_tags (line 127) | def normalize_empty_tags(sentences): function process_tags (line 138) | def process_tags(sentences, scheme): function decode_from_bioes (line 218) | def decode_from_bioes(tags): function merge_tags (line 267) | def merge_tags(*sequences): FILE: stanza/models/ner/vocab.py class TagVocab (line 8) | class TagVocab(BaseVocab): method build_vocab (line 10) | def build_vocab(self): function convert_tag_vocab (line 16) | def convert_tag_vocab(state_dict): class MultiVocab (line 31) | class MultiVocab(BaseMultiVocab): method state_dict (line 32) | def state_dict(self): method load_state_dict (line 43) | def load_state_dict(cls, state_dict): FILE: stanza/models/ner_tagger.py function build_argparse (line 36) | def build_argparse(): function parse_args (line 124) | def parse_args(args=None): function main (line 136) | def main(args=None): function load_pretrain (line 148) | def load_pretrain(args): function model_file_name (line 165) | def model_file_name(args): function get_known_tags (line 168) | def get_known_tags(tags): function warn_missing_tags (line 182) | def warn_missing_tags(tag_vocab, data_tags, error_msg, bioes_to_bio=False): function train (line 209) | def train(args): function write_ner_results (line 408) | def write_ner_results(filename, batch, preds, predict_tagset): function evaluate (line 427) | def evaluate(args): function evaluate_model (line 434) | def evaluate_model(loaded_args, trainer, vocab, eval_file): function load_model (line 473) | def load_model(args, model_file): FILE: stanza/models/parser.py function build_argparse (line 42) | def build_argparse(): function parse_args (line 206) | def parse_args(args=None): function main (line 217) | def main(args=None): function model_file_name (line 229) | def model_file_name(args): function load_pretrain (line 233) | def load_pretrain(args): function predict_dataset (line 244) | def predict_dataset(trainer, dev_batch): function train (line 253) | def train(args): function evaluate (line 467) | def evaluate(args): function evaluate_trainer (line 482) | def evaluate_trainer(args, trainer, pretrain): FILE: stanza/models/pos/build_xpos_vocab_factory.py function get_xpos_factory (line 20) | def get_xpos_factory(shorthand, fn): function main (line 48) | def main(): FILE: stanza/models/pos/data.py class Dataset (line 24) | class Dataset: method __init__ (line 25) | def __init__(self, doc, args, pretrain, vocab=None, evaluation=False, ... method init_vocab (line 66) | def init_vocab(docs, args): method preprocess (line 84) | def preprocess(self, data, vocab, pretrain_vocab, args): method __len__ (line 102) | def __len__(self): method __mask (line 105) | def __mask(self, upos): method __getitem__ (line 129) | def __getitem__(self, key): method __iter__ (line 216) | def __iter__(self): method to_loader (line 220) | def to_loader(self, **kwargs): method to_length_limited_loader (line 227) | def to_length_limited_loader(self, batch_size, maximum_tokens): method __collate_fn (line 234) | def __collate_fn(data): method load_doc (line 280) | def load_doc(doc): method resolve_none (line 287) | def resolve_none(data): class LengthLimitedBatchSampler (line 296) | class LengthLimitedBatchSampler(Sampler): method __init__ (line 305) | def __init__(self, data, batch_size, maximum_tokens): method __len__ (line 336) | def __len__(self): method __iter__ (line 339) | def __iter__(self): class ShuffledDataset (line 347) | class ShuffledDataset: method __init__ (line 374) | def __init__(self, datasets, batch_size): method __iter__ (line 379) | def __iter__(self): method __len__ (line 389) | def __len__(self): FILE: stanza/models/pos/model.py class Tagger (line 22) | class Tagger(nn.Module): method __init__ (line 23) | def __init__(self, args, vocab, emb_matrix=None, share_hid=False, foun... method add_unsaved_module (line 134) | def add_unsaved_module(self, name, module): method log_norms (line 138) | def log_norms(self): method forward (line 141) | def forward(self, word, word_mask, wordchars, wordchars_mask, upos, xp... FILE: stanza/models/pos/scorer.py function score (line 10) | def score(system_conllu_file, gold_conllu_file, verbose=True, eval_type=... FILE: stanza/models/pos/trainer.py function unpack_batch (line 19) | def unpack_batch(batch, device): class Trainer (line 29) | class Trainer(BaseTrainer): method __init__ (line 31) | def __init__(self, args=None, vocab=None, pretrain=None, model_file=No... method update (line 63) | def update(self, batch, eval=False): method predict (line 91) | def predict(self, batch, unsort=True): method save (line 108) | def save(self, filename, skip_modules=True): method load (line 133) | def load(self, filename, pretrain, args=None, foundation_cache=None): FILE: stanza/models/pos/vocab.py class WordVocab (line 6) | class WordVocab(BaseVocab): method __init__ (line 7) | def __init__(self, data=None, lang="", idx=0, cutoff=0, lower=False, i... method id2unit (line 12) | def id2unit(self, id): method unit2id (line 18) | def unit2id(self, unit): method build_vocab (line 24) | def build_vocab(self): method __iter__ (line 36) | def __iter__(self): method __str__ (line 43) | def __str__(self): class XPOSVocab (line 46) | class XPOSVocab(CompositeVocab): method __init__ (line 47) | def __init__(self, data=None, lang="", idx=0, sep="", keyed=False): class FeatureVocab (line 50) | class FeatureVocab(CompositeVocab): method __init__ (line 51) | def __init__(self, data=None, lang="", idx=0, sep="|", keyed=True): class MultiVocab (line 54) | class MultiVocab(BaseMultiVocab): method state_dict (line 55) | def state_dict(self): method load_state_dict (line 66) | def load_state_dict(cls, state_dict): FILE: stanza/models/pos/xpos_vocab_factory.py function xpos_vocab_factory (line 188) | def xpos_vocab_factory(data, shorthand): FILE: stanza/models/pos/xpos_vocab_utils.py class XPOSType (line 9) | class XPOSType(Enum): function filter_data (line 18) | def filter_data(data, idx): function choose_simplest_factory (line 28) | def choose_simplest_factory(data, shorthand): function build_xpos_vocab (line 44) | def build_xpos_vocab(description, data, shorthand): FILE: stanza/models/tagger.py function build_argparse (line 33) | def build_argparse(): function parse_args (line 122) | def parse_args(args=None): function main (line 139) | def main(args=None): function model_file_name (line 151) | def model_file_name(args): function save_each_file_name (line 154) | def save_each_file_name(args): function load_pretrain (line 159) | def load_pretrain(args): function get_eval_type (line 170) | def get_eval_type(dev_batch): function load_training_data (line 181) | def load_training_data(args, pretrain): function train (line 255) | def train(args): function evaluate (line 416) | def evaluate(args): function evaluate_trainer (line 431) | def evaluate_trainer(args, trainer, pretrain): FILE: stanza/models/tokenization/data.py function filter_consecutive_whitespaces (line 16) | def filter_consecutive_whitespaces(para): class TokenizationDataset (line 34) | class TokenizationDataset: method __init__ (line 35) | def __init__(self, tokenizer_args, input_files={'txt': None, 'label': ... method labels (line 75) | def labels(self): method extract_dict_feat (line 83) | def extract_dict_feat(self, para, idx): method para_to_sentences (line 120) | def para_to_sentences(self, para): method advance_old_batch (line 186) | def advance_old_batch(self, eval_offsets, old_batch): function build_move_punct_set (line 217) | def build_move_punct_set(data, move_back_prob): function build_known_mwt (line 240) | def build_known_mwt(data, mwt_expansions): class DataLoader (line 264) | class DataLoader(TokenizationDataset): method __init__ (line 268) | def __init__(self, args, input_files={'txt': None, 'label': None}, inp... method __len__ (line 318) | def __len__(self): method init_vocab (line 321) | def init_vocab(self): method augment_vocab (line 326) | def augment_vocab(vocab, data, existing_unit, new_unit): method init_sent_ids (line 346) | def init_sent_ids(self): method has_mwt (line 354) | def has_mwt(self): method shuffle (line 364) | def shuffle(self): method move_last_char (line 369) | def move_last_char(self, sentence): method split_mwt (line 377) | def split_mwt(self, sentence): method move_punct_back (line 416) | def move_punct_back(self, sentence): method augment_final_punct (line 443) | def augment_final_punct(self, sentence): method next (line 456) | def next(self, eval_offsets=None, unit_dropout=0.0, feat_unit_dropout=... class SortedDataset (line 619) | class SortedDataset(Dataset): method __init__ (line 629) | def __init__(self, dataset): method __len__ (line 635) | def __len__(self): method __getitem__ (line 638) | def __getitem__(self, index): method unsort (line 646) | def unsort(self, arr): method collate (line 649) | def collate(self, samples): FILE: stanza/models/tokenization/model.py class Tokenizer (line 9) | class Tokenizer(nn.Module): method __init__ (line 10) | def __init__(self, args, nchars, emb_dim, hidden_dim, dropout, feat_dr... method add_unsaved_module (line 60) | def add_unsaved_module(self, name, module): method forward (line 64) | def forward(self, x, feats, lengths, raw=None): FILE: stanza/models/tokenization/tokenize_files.py function tokenize_to_file (line 32) | def tokenize_to_file(tokenizer, fin, fout, chunk_size=500): function main (line 47) | def main(args=None): FILE: stanza/models/tokenization/trainer.py class Trainer (line 16) | class Trainer(BaseTrainer): method __init__ (line 17) | def __init__(self, args=None, vocab=None, lexicon=None, dictionary=Non... method update (line 35) | def update(self, inputs): method predict (line 57) | def predict(self, inputs): method save (line 70) | def save(self, filename, skip_modules=True): method load (line 94) | def load(self, filename, args, foundation_cache): FILE: stanza/models/tokenization/utils.py function create_dictionary (line 21) | def create_dictionary(lexicon): function create_lexicon (line 52) | def create_lexicon(shorthand=None, train_path=None, external_path=None): function load_lexicon (line 123) | def load_lexicon(args): function load_mwt_dict (line 145) | def load_mwt_dict(filename): function process_sentence (line 166) | def process_sentence(sentence, mwt_dict=None): function find_spans (line 207) | def find_spans(raw): function update_pred_regex (line 225) | def update_pred_regex(raw, pred): function predict (line 253) | def predict(trainer, data_generator, batch_size, max_seqlen, use_regex_t... function output_predictions (line 326) | def output_predictions(output_file, trainer, data_generator, vocab, mwt_... function postprocess_doc (line 344) | def postprocess_doc(doc, postprocessor, orig_text=None): function reassemble_doc_from_tokens (line 407) | def reassemble_doc_from_tokens(tokens, mwts, expansions, raw_text): function decode_predictions (line 469) | def decode_predictions(vocab, mwt_dict, orig_text, all_raw, all_preds, n... function match_tokens_with_text (line 550) | def match_tokens_with_text(sentences, orig_text): function eval_model (line 581) | def eval_model(args, trainer, batches, vocab, mwt_dict): FILE: stanza/models/tokenization/vocab.py class Vocab (line 9) | class Vocab(BaseVocab): method __init__ (line 10) | def __init__(self, *args, **kwargs): method build_vocab (line 14) | def build_vocab(self): method append (line 25) | def append(self, unit): method normalize_unit (line 30) | def normalize_unit(self, unit): method normalize_token (line 34) | def normalize_token(self, token): FILE: stanza/models/tokenizer.py function build_argparse (line 34) | def build_argparse(): function parse_args (line 104) | def parse_args(args=None): function model_file_name (line 114) | def model_file_name(args): function main (line 126) | def main(args=None): function train (line 143) | def train(args): function evaluate (line 248) | def evaluate(args): FILE: stanza/models/wl_coref.py function output_running_time (line 62) | def output_running_time(): function deterministic (line 73) | def deterministic() -> None: FILE: stanza/pipeline/constituency_processor.py class ConstituencyProcessor (line 16) | class ConstituencyProcessor(UDProcessor): method _set_up_requires (line 25) | def _set_up_requires(self): method _set_up_model (line 32) | def _set_up_model(self, config, pipeline, device): method _set_up_final_config (line 52) | def _set_up_final_config(self, config): method process (line 58) | def process(self, document): method get_constituents (line 74) | def get_constituents(self): FILE: stanza/pipeline/core.py class DownloadMethod (line 39) | class DownloadMethod(Enum): class LanguageNotDownloadedError (line 51) | class LanguageNotDownloadedError(FileNotFoundError): method __init__ (line 52) | def __init__(self, lang, lang_dir, model_path): class UnsupportedProcessorError (line 58) | class UnsupportedProcessorError(FileNotFoundError): method __init__ (line 59) | def __init__(self, processor, lang): class IllegalPackageError (line 64) | class IllegalPackageError(ValueError): method __init__ (line 65) | def __init__(self, msg): class PipelineRequirementsException (line 68) | class PipelineRequirementsException(Exception): method __init__ (line 74) | def __init__(self, processor_req_fails): method processor_req_fails (line 79) | def processor_req_fails(self): method build_message (line 82) | def build_message(self): method __str__ (line 87) | def __str__(self): function build_default_config_option (line 90) | def build_default_config_option(model_specs): function filter_variants (line 111) | def filter_variants(model_specs): function build_default_config (line 115) | def build_default_config(resources, lang, model_dir, load_list): function normalize_download_method (line 163) | def normalize_download_method(download_method): class Pipeline (line 176) | class Pipeline: method __init__ (line 178) | def __init__(self, method update_kwargs (line 351) | def update_kwargs(kwargs, processor_list): method filter_config (line 372) | def filter_config(prefix, config_dict): method loaded_processors (line 384) | def loaded_processors(self): method process (line 391) | def process(self, doc, processors=None): method process_conllu (line 434) | def process_conllu(self, doc, ignore_gapping=True, processors=None): method bulk_process (line 445) | def bulk_process(self, docs, *args, **kwargs): method stream (line 455) | def stream(self, docs, batch_size=50, *args, **kwargs): method __str__ (line 483) | def __str__(self): method __call__ (line 490) | def __call__(self, doc, processors=None): function main (line 493) | def main(): FILE: stanza/pipeline/coref_processor.py function extract_text (line 14) | def extract_text(document, sent_id, start_word, end_word): class CorefProcessor (line 56) | class CorefProcessor(UDProcessor): method _set_up_model (line 62) | def _set_up_model(self, config, pipeline, device): method process (line 91) | def process(self, document): method _handle_zero_anaphora (line 200) | def _handle_zero_anaphora(self, document, results, sent_ids, word_pos): FILE: stanza/pipeline/demo/demo_server.py function get_file (line 9) | def get_file(path): function static_file (line 16) | def static_file(path): function index (line 27) | def index(): function annotate (line 31) | def annotate(): function create_app (line 57) | def create_app(): FILE: stanza/pipeline/demo/stanza-brat.js function isInt (line 49) | function isInt(value) { function posColor (line 71) | function posColor(posTag) { function uposColor (line 105) | function uposColor(posTag) { function nerColor (line 137) | function nerColor(nerTag) { function sentimentColor (line 164) | function sentimentColor(sentiment) { function annotators (line 184) | function annotators() { function date (line 195) | function date() { function ConstituencyParseProcessor (line 213) | function ConstituencyParseProcessor() { function render (line 316) | function render(data, reverse) { function renderTokensregex (line 834) | function renderTokensregex(data) { function renderSemgrex (line 893) | function renderSemgrex(data) { function renderTregex (line 971) | function renderTregex(data) { function createAnnotationDiv (line 1093) | function createAnnotationDiv(id, annotator, selector, label) { FILE: stanza/pipeline/demo/stanza-parseviewer.js function adjustGraphPositioning (line 105) | function adjustGraphPositioning(svg, g, minWidth, minHeight) { FILE: stanza/pipeline/depparse_processor.py class DepparseProcessor (line 21) | class DepparseProcessor(UDProcessor): method __init__ (line 28) | def __init__(self, config, pipeline, device): method _set_up_requires (line 32) | def _set_up_requires(self): method _set_up_model (line 39) | def _set_up_model(self, config, pipeline, device): method get_known_relations (line 49) | def get_known_relations(self): method process (line 56) | def process(self, document): FILE: stanza/pipeline/external/corenlp_converter_depparse.py class ConverterDepparse (line 10) | class ConverterDepparse(ProcessorVariant): method __init__ (line 14) | def __init__(self, config): method process (line 28) | def process(self, document): FILE: stanza/pipeline/external/jieba.py function check_jieba (line 12) | def check_jieba(): class JiebaTokenizer (line 25) | class JiebaTokenizer(ProcessorVariant): method __init__ (line 26) | def __init__(self, config): method process (line 43) | def process(self, document): FILE: stanza/pipeline/external/pythainlp.py function check_pythainlp (line 11) | def check_pythainlp(): class PyThaiNLPTokenizer (line 26) | class PyThaiNLPTokenizer(ProcessorVariant): method __init__ (line 27) | def __init__(self, config): method process (line 44) | def process(self, document): FILE: stanza/pipeline/external/spacy.py function check_spacy (line 9) | def check_spacy(): class SpacyTokenizer (line 22) | class SpacyTokenizer(ProcessorVariant): method __init__ (line 23) | def __init__(self, config): method process (line 48) | def process(self, document): FILE: stanza/pipeline/external/sudachipy.py function check_sudachipy (line 13) | def check_sudachipy(): class SudachiPyTokenizer (line 29) | class SudachiPyTokenizer(ProcessorVariant): method __init__ (line 30) | def __init__(self, config): method process (line 45) | def process(self, document): FILE: stanza/pipeline/langid_processor.py class LangIDProcessor (line 17) | class LangIDProcessor(UDProcessor): method _set_up_model (line 31) | def _set_up_model(self, config, pipeline, device): method _text_to_tensor (line 38) | def _text_to_tensor(self, docs): method _id_langs (line 50) | def _id_langs(self, batch_tensor): method clean_text (line 67) | def clean_text(text): method _process_list (line 84) | def _process_list(self, docs): method process (line 113) | def process(self, doc): method bulk_process (line 121) | def bulk_process(self, docs): FILE: stanza/pipeline/lemma_processor.py class LemmaProcessor (line 18) | class LemmaProcessor(UDProcessor): method __init__ (line 28) | def __init__(self, config, pipeline, device): method use_identity (line 35) | def use_identity(self): method _set_up_model (line 38) | def _set_up_model(self, config, pipeline, device): method _set_up_requires (line 60) | def _set_up_requires(self): method process (line 69) | def process(self, document): FILE: stanza/pipeline/morphseg_processor.py class MorphSegProcessor (line 7) | class MorphSegProcessor(UDProcessor): method __init__ (line 11) | def __init__(self, config, pipeline, device): method _set_up_model (line 18) | def _set_up_model(self, config, pipeline, device): method process (line 45) | def process(self, document): FILE: stanza/pipeline/multilingual.py class MultilingualPipeline (line 18) | class MultilingualPipeline: method __init__ (line 40) | def __init__(self, method _update_pipeline_cache (line 103) | def _update_pipeline_cache(self, lang): method process (line 148) | def process(self, doc): method __call__ (line 185) | def __call__(self, doc): FILE: stanza/pipeline/mwt_processor.py class MWTProcessor (line 15) | class MWTProcessor(UDProcessor): method _set_up_model (line 22) | def _set_up_model(self, config, pipeline, device): method build_batch (line 25) | def build_batch(self, document): method process (line 28) | def process(self, document): method bulk_process (line 52) | def bulk_process(self, docs): FILE: stanza/pipeline/ner_processor.py class NERProcessor (line 21) | class NERProcessor(UDProcessor): method _get_dependencies (line 28) | def _get_dependencies(self, config, dep_name): method _set_up_model (line 37) | def _set_up_model(self, config, pipeline, device): method _set_up_final_config (line 83) | def _set_up_final_config(self, config): method __str__ (line 98) | def __str__(self): method mark_inactive (line 101) | def mark_inactive(self): method process (line 106) | def process(self, document): method bulk_process (line 127) | def bulk_process(self, docs): method get_known_tags (line 136) | def get_known_tags(self, model_idx=0): FILE: stanza/pipeline/pos_processor.py class POSProcessor (line 19) | class POSProcessor(UDProcessor): method _set_up_model (line 26) | def _set_up_model(self, config, pipeline, device): method __str__ (line 35) | def __str__(self): method get_known_xpos (line 38) | def get_known_xpos(self): method is_composite_xpos (line 49) | def is_composite_xpos(self): method get_known_upos (line 55) | def get_known_upos(self): method get_known_feats (line 62) | def get_known_feats(self): method process (line 69) | def process(self, document): FILE: stanza/pipeline/processor.py class ProcessorRequirementsException (line 10) | class ProcessorRequirementsException(Exception): method __init__ (line 13) | def __init__(self, processors_list, err_processor, provided_reqs): method err_processor (line 22) | def err_processor(self): method processor_type (line 27) | def processor_type(self): method processors_list (line 31) | def processors_list(self): method provided_reqs (line 35) | def provided_reqs(self): method build_message (line 38) | def build_message(self): method __str__ (line 48) | def __str__(self): class Processor (line 52) | class Processor(ABC): method __init__ (line 55) | def __init__(self, config, pipeline, device): method __str__ (line 73) | def __str__(self): method process (line 88) | def process(self, doc): method bulk_process (line 92) | def bulk_process(self, docs): method _set_up_provides (line 100) | def _set_up_provides(self): method _set_up_requires (line 104) | def _set_up_requires(self): method _set_up_variant_requires (line 108) | def _set_up_variant_requires(self): method _set_up_variants (line 125) | def _set_up_variants(self, config, device): method config (line 133) | def config(self): method pipeline (line 138) | def pipeline(self): method provides (line 143) | def provides(self): method requires (line 147) | def requires(self): method _check_requirements (line 150) | def _check_requirements(self): class ProcessorVariant (line 160) | class ProcessorVariant(ABC): method process (line 166) | def process(self, doc): method bulk_process (line 177) | def bulk_process(self, docs): class UDProcessor (line 182) | class UDProcessor(Processor): method __init__ (line 185) | def __init__(self, config, pipeline, device): method _set_up_model (line 199) | def _set_up_model(self, config, pipeline, device): method _set_up_final_config (line 202) | def _set_up_final_config(self, config): method mark_inactive (line 214) | def mark_inactive(self): method pretrain (line 220) | def pretrain(self): method trainer (line 224) | def trainer(self): method vocab (line 228) | def vocab(self): method filter_out_option (line 232) | def filter_out_option(option): method bulk_process (line 242) | def bulk_process(self, docs): class ProcessorRegisterException (line 262) | class ProcessorRegisterException(Exception): method __init__ (line 265) | def __init__(self, processor_class, expected_parent): method build_message (line 270) | def build_message(self): method __str__ (line 273) | def __str__(self): function register_processor (line 276) | def register_processor(name): function register_processor_variant (line 286) | def register_processor_variant(name, variant): FILE: stanza/pipeline/sentiment_processor.py class SentimentProcessor (line 23) | class SentimentProcessor(UDProcessor): method _set_up_model (line 35) | def _set_up_model(self, config, pipeline, device): method _set_up_final_config (line 65) | def _set_up_final_config(self, config): method process (line 72) | def process(self, document): FILE: stanza/pipeline/tokenize_processor.py class TokenizeProcessor (line 31) | class TokenizeProcessor(UDProcessor): method _set_up_model (line 40) | def _set_up_model(self, config, pipeline, device): method process_pre_tokenized_text (line 57) | def process_pre_tokenized_text(self, input_src): method process (line 82) | def process(self, document): method bulk_process (line 121) | def bulk_process(self, docs): FILE: stanza/protobuf/__init__.py function parseFromDelimitedString (line 11) | def parseFromDelimitedString(obj, buf, offset=0): function writeToDelimitedString (line 27) | def writeToDelimitedString(obj, stream=None): function to_text (line 42) | def to_text(sentence): FILE: stanza/resources/common.py class ResourcesFileNotFoundError (line 45) | class ResourcesFileNotFoundError(FileNotFoundError): method __init__ (line 46) | def __init__(self, resources_filepath): class UnknownLanguageError (line 50) | class UnknownLanguageError(ValueError): method __init__ (line 51) | def __init__(self, unknown): class UnknownProcessorError (line 55) | class UnknownProcessorError(ValueError): method __init__ (line 56) | def __init__(self, unknown): function ensure_dir (line 62) | def ensure_dir(path): function get_md5 (line 68) | def get_md5(path): function unzip (line 81) | def unzip(path, filename): function get_root_from_zipfile (line 89) | def get_root_from_zipfile(filename): function file_exists (line 98) | def file_exists(path, md5): function assert_file_exists (line 104) | def assert_file_exists(path, md5=None, alternate_md5=None): function download_file (line 115) | def download_file(url, path, proxies, raise_for_status=False): function request_file (line 138) | def request_file(url, path, proxies=None, md5=None, raise_for_status=Fal... function sort_processors (line 168) | def sort_processors(processor_list): function add_mwt (line 186) | def add_mwt(processors, resources, lang): function maintain_processor_list (line 201) | def maintain_processor_list(resources, lang, package, processors, allow_... function add_dependencies (line 299) | def add_dependencies(resources, lang, processor_list): function flatten_processor_list (line 327) | def flatten_processor_list(processor_list): function set_logging_level (line 350) | def set_logging_level(logging_level, verbose): function process_pipeline_parameters (line 376) | def process_pipeline_parameters(lang, model_dir, package, processors): function download_resources_json (line 441) | def download_resources_json(model_dir=DEFAULT_MODEL_DIR, function load_resources_json (line 468) | def load_resources_json(model_dir=DEFAULT_MODEL_DIR, resources_filepath=... function get_language_resources (line 480) | def get_language_resources(resources, lang): function list_available_languages (line 494) | def list_available_languages(model_dir=DEFAULT_MODEL_DIR, function expand_model_url (line 511) | def expand_model_url(resources, model_url): function download_models (line 517) | def download_models(download_list, function download (line 556) | def download( FILE: stanza/resources/default_packages.py function build_default_pretrains (line 220) | def build_default_pretrains(default_treebanks): function known_nicknames (line 950) | def known_nicknames(): FILE: stanza/resources/installation.py function download_corenlp_models (line 34) | def download_corenlp_models(model, version, dir=DEFAULT_CORENLP_DIR, url... function install_corenlp (line 88) | def install_corenlp(dir=DEFAULT_CORENLP_DIR, url=DEFAULT_CORENLP_URL, lo... FILE: stanza/resources/prepare_resources.py function parse_args (line 30) | def parse_args(): function ensure_dir (line 73) | def ensure_dir(dir): function copy_file (line 77) | def copy_file(src, dst): function get_md5 (line 82) | def get_md5(path): function split_model_name (line 87) | def split_model_name(model): function split_package (line 105) | def split_package(package, default_use_charlm=True): function get_pretrain_package (line 129) | def get_pretrain_package(lang, package, model_pretrains, default_pretrai... function get_charlm_package (line 141) | def get_charlm_package(lang, package, model_charlms, default_charlms, de... function get_con_dependencies (line 152) | def get_con_dependencies(lang, package): function get_pos_charlm_package (line 166) | def get_pos_charlm_package(lang, package): function get_pos_dependencies (line 169) | def get_pos_dependencies(lang, package): function get_lemma_pretrain_package (line 183) | def get_lemma_pretrain_package(lang, package): function get_lemma_charlm_package (line 195) | def get_lemma_charlm_package(lang, package): function get_lemma_dependencies (line 198) | def get_lemma_dependencies(lang, package): function get_tokenizer_charlm_package (line 213) | def get_tokenizer_charlm_package(lang, package): function get_tokenizer_dependencies (line 216) | def get_tokenizer_dependencies(lang, package): function get_depparse_charlm_package (line 223) | def get_depparse_charlm_package(lang, package): function get_depparse_dependencies (line 226) | def get_depparse_dependencies(lang, package): function get_ner_charlm_package (line 240) | def get_ner_charlm_package(lang, package): function get_ner_pretrain_package (line 243) | def get_ner_pretrain_package(lang, package): function get_ner_dependencies (line 246) | def get_ner_dependencies(lang, package): function get_sentiment_dependencies (line 260) | def get_sentiment_dependencies(lang, package): function get_dependencies (line 279) | def get_dependencies(processor, lang, package): function process_dirs (line 302) | def process_dirs(args): function get_default_pos_package (line 341) | def get_default_pos_package(lang, ud_package): function get_default_depparse_package (line 349) | def get_default_depparse_package(lang, ud_package): function process_default_zips (line 357) | def process_default_zips(args): function get_default_processors (line 411) | def get_default_processors(resources, lang): function get_default_optional_processors (line 478) | def get_default_optional_processors(resources, lang): function update_processor_add_transformer (line 488) | def update_processor_add_transformer(resources, lang, current_processors... function get_default_accurate (line 498) | def get_default_accurate(resources, lang): function get_optional_accurate (line 536) | def get_optional_accurate(resources, lang): function get_default_fast (line 550) | def get_default_fast(resources, lang): function process_packages (line 578) | def process_packages(args): function process_lcode (line 674) | def process_lcode(args): function process_misc (line 702) | def process_misc(args): function main (line 713) | def main(): FILE: stanza/resources/print_charlm_depparse.py function list_depparse (line 12) | def list_depparse(): FILE: stanza/server/annotator.py class Annotator (line 11) | class Annotator(Process): method name (line 21) | def name(self): method requires (line 28) | def requires(self): method provides (line 36) | def provides(self): method annotate (line 45) | def annotate(self, ann): method properties (line 53) | def properties(self): class _Handler (line 64) | class _Handler(BaseHTTPRequestHandler): method __init__ (line 67) | def __init__(self, request, client_address, server): method do_GET (line 70) | def do_GET(self): method do_POST (line 87) | def do_POST(self): method __init__ (line 117) | def __init__(self, host="", port=8432): method run (line 125) | def run(self): FILE: stanza/server/client.py function is_corenlp_lang (line 50) | def is_corenlp_lang(props_str): function validate_corenlp_props (line 59) | def validate_corenlp_props(properties=None, annotators=None, output_form... class AnnotationException (line 69) | class AnnotationException(Exception): class TimeoutException (line 74) | class TimeoutException(AnnotationException): class ShouldRetryException (line 79) | class ShouldRetryException(Exception): class PermanentlyFailedException (line 84) | class PermanentlyFailedException(Exception): class StartServer (line 88) | class StartServer(enum.Enum): function clean_props_file (line 94) | def clean_props_file(props_file): class RobustService (line 101) | class RobustService(object): method __init__ (line 105) | def __init__(self, start_cmd, stop_cmd, endpoint, stdout=None, method is_alive (line 121) | def is_alive(self): method start (line 129) | def start(self): method atexit_kill (line 161) | def atexit_kill(self): method stop (line 168) | def stop(self): method __enter__ (line 186) | def __enter__(self): method __exit__ (line 190) | def __exit__(self, _, __, ___): method ensure_alive (line 193) | def ensure_alive(self): function resolve_classpath (line 226) | def resolve_classpath(classpath=None): class CoreNLPClient (line 247) | class CoreNLPClient(RobustService): method __init__ (line 257) | def __init__(self, start_server=StartServer.FORCE_START, method _setup_client_defaults (line 369) | def _setup_client_defaults(self): method _setup_server_defaults (line 386) | def _setup_server_defaults(self): method _request (line 437) | def _request(self, buf, properties, reset_default=False, **kwargs): method annotate (line 476) | def annotate(self, text, annotators=None, output_format=None, properti... method update (line 548) | def update(self, doc, annotators=None, properties=None): method tokensregex (line 567) | def tokensregex(self, text, pattern, filter=False, to_words=False, ann... method semgrex (line 574) | def semgrex(self, text, pattern, filter=False, to_words=False, annotat... method fill_tree_proto (line 580) | def fill_tree_proto(self, tree, proto_tree): method tregex (line 587) | def tregex(self, text=None, pattern=None, filter=False, annotators=Non... method __regex (line 634) | def __regex(self, path, text, pattern, filter, annotators=None, proper... method scenegraph (line 696) | def scenegraph(self, text, properties=None): function read_corenlp_props (line 737) | def read_corenlp_props(props_path): function write_corenlp_props (line 751) | def write_corenlp_props(props_dict, file_path=None): function regex_matches_to_indexed_words (line 767) | def regex_matches_to_indexed_words(matches): FILE: stanza/server/dependency_converter.py function send_converter_request (line 13) | def send_converter_request(request, classpath=None): function build_request (line 16) | def build_request(doc): function process_doc (line 25) | def process_doc(doc, classpath=None): function attach_dependencies (line 34) | def attach_dependencies(doc, response): class DependencyConverter (line 65) | class DependencyConverter(JavaProtobufContext): method __init__ (line 72) | def __init__(self, classpath=None): method process (line 75) | def process(self, doc): function main (line 84) | def main(): FILE: stanza/server/java_protobuf_requests.py function send_request (line 9) | def send_request(request, response_type, java_main, classpath=None): function add_tree_nodes (line 26) | def add_tree_nodes(proto_tree, tree, score): function build_tree (line 50) | def build_tree(tree, score): function from_tree (line 66) | def from_tree(proto_tree): function add_token (line 115) | def add_token(token_list, word, token): function add_sentence (line 168) | def add_sentence(request_sentences, sentence, num_tokens): function add_word_to_graph (line 180) | def add_word_to_graph(graph, word, sent_idx): function convert_networkx_graph (line 206) | def convert_networkx_graph(graph_proto, sentence, sent_idx): function features_to_string (line 253) | def features_to_string(features): function misc_space_pieces (line 260) | def misc_space_pieces(misc): function remove_space_misc (line 272) | def remove_space_misc(misc): function substitute_space_misc (line 284) | def substitute_space_misc(misc, space_misc): class JavaProtobufContext (line 317) | class JavaProtobufContext(object): method __init__ (line 321) | def __init__(self, classpath, build_response, java_main, extra_args=No... method open_pipe (line 331) | def open_pipe(self): method close_pipe (line 336) | def close_pipe(self): method __enter__ (line 342) | def __enter__(self): method __exit__ (line 346) | def __exit__(self, type, value, traceback): method process_request (line 349) | def process_request(self, request): FILE: stanza/server/main.py function dictstr (line 18) | def dictstr(arg): function do_annotate (line 33) | def do_annotate(args): function main (line 51) | def main(): FILE: stanza/server/morphology.py function send_morphology_request (line 14) | def send_morphology_request(request): function build_request (line 17) | def build_request(words, xpos_tags): function process_text (line 31) | def process_text(words, xpos_tags): class Morphology (line 45) | class Morphology(JavaProtobufContext): method __init__ (line 54) | def __init__(self, classpath=None): method process (line 57) | def process(self, words, xpos_tags): function main (line 65) | def main(): FILE: stanza/server/parser_eval.py function build_request (line 18) | def build_request(treebank): function collate (line 45) | def collate(gold_treebank, predictions_treebank): class EvaluateParser (line 56) | class EvaluateParser(JavaProtobufContext): method __init__ (line 63) | def __init__(self, classpath=None, kbest=None, silent=False): method process (line 74) | def process(self, treebank): function main (line 79) | def main(): FILE: stanza/server/semgrex.py function send_semgrex_request (line 50) | def send_semgrex_request(request): function build_request (line 53) | def build_request(doc, semgrex_patterns, enhanced=False): function process_doc (line 77) | def process_doc(doc, *semgrex_patterns, enhanced=False): class Semgrex (line 87) | class Semgrex(JavaProtobufContext): method __init__ (line 94) | def __init__(self, classpath=None): method process (line 97) | def process(self, doc, *semgrex_patterns): function annotate_doc (line 104) | def annotate_doc(doc, semgrex_result, semgrex_patterns, matches_only, ex... function main (line 180) | def main(): FILE: stanza/server/ssurgeon.py function parse_ssurgeon_edits (line 30) | def parse_ssurgeon_edits(ssurgeon_text): function read_ssurgeon_edits (line 47) | def read_ssurgeon_edits(edit_file): function send_ssurgeon_request (line 51) | def send_ssurgeon_request(request): function build_request (line 54) | def build_request(doc, ssurgeon_edits): function build_request_one_operation (line 84) | def build_request_one_operation(doc, semgrex_pattern, ssurgeon_edits, ss... function process_doc (line 88) | def process_doc(doc, ssurgeon_edits): function process_doc_one_operation (line 98) | def process_doc_one_operation(doc, semgrex_pattern, ssurgeon_edits, ssur... function build_word_entry (line 103) | def build_word_entry(word_index, graph_word): function convert_response_to_doc (line 129) | def convert_response_to_doc(doc, semgrex_response, add_missing_text): class Ssurgeon (line 213) | class Ssurgeon(java_protobuf_requests.JavaProtobufContext): method __init__ (line 220) | def __init__(self, classpath=None): method process (line 223) | def process(self, doc, ssurgeon_edits): method process_one_operation (line 230) | def process_one_operation(self, doc, semgrex_pattern, ssurgeon_edits, ... function main (line 250) | def main(): FILE: stanza/server/tokensregex.py function send_tokensregex_request (line 15) | def send_tokensregex_request(request): function process_doc (line 19) | def process_doc(doc, *patterns): function main (line 33) | def main(): FILE: stanza/server/tsurgeon.py function send_tsurgeon_request (line 24) | def send_tsurgeon_request(request): function build_request (line 28) | def build_request(trees, operations): function process_trees (line 53) | def process_trees(trees, *operations): class Tsurgeon (line 65) | class Tsurgeon(JavaProtobufContext): method __init__ (line 72) | def __init__(self, classpath=None): method process (line 75) | def process(self, trees, *operations): function main (line 81) | def main(): FILE: stanza/server/ud_enhancer.py function build_enhancer_request (line 9) | def build_enhancer_request(doc, language, pronouns_pattern): function process_doc (line 49) | def process_doc(doc, language=None, pronouns_pattern=None): class UniversalEnhancer (line 53) | class UniversalEnhancer(JavaProtobufContext): method __init__ (line 60) | def __init__(self, language=None, pronouns_pattern=None, classpath=None): method process (line 67) | def process(self, doc): function main (line 71) | def main(): FILE: stanza/tests/__init__.py function safe_rm (line 82) | def safe_rm(path_to_rm): function compare_ignoring_whitespace (line 109) | def compare_ignoring_whitespace(predicted, expected): FILE: stanza/tests/classifiers/test_classifier.py function fake_embeddings (line 24) | def fake_embeddings(tmp_path_factory): class TestClassifier (line 48) | class TestClassifier: method build_model (line 49) | def build_model(self, tmp_path, fake_embeddings, train_file, dev_file,... method run_training (line 74) | def run_training(self, tmp_path, fake_embeddings, train_file, dev_file... method test_build_model (line 88) | def test_build_model(self, tmp_path, fake_embeddings, train_file, dev_... method test_save_load (line 94) | def test_save_load(self, tmp_path, fake_embeddings, train_file, dev_fi... method test_train_basic (line 108) | def test_train_basic(self, tmp_path, fake_embeddings, train_file, dev_... method test_train_bilstm (line 111) | def test_train_bilstm(self, tmp_path, fake_embeddings, train_file, dev... method test_train_maxpool_width (line 121) | def test_train_maxpool_width(self, tmp_path, fake_embeddings, train_fi... method test_train_conv_2d (line 137) | def test_train_conv_2d(self, tmp_path, fake_embeddings, train_file, de... method test_train_filter_channels (line 147) | def test_train_filter_channels(self, tmp_path, fake_embeddings, train_... method test_train_bert (line 157) | def test_train_bert(self, tmp_path, fake_embeddings, train_file, dev_f... method test_finetune_bert (line 170) | def test_finetune_bert(self, tmp_path, fake_embeddings, train_file, de... method test_finetune_bert_layers (line 183) | def test_finetune_bert_layers(self, tmp_path, fake_embeddings, train_f... method test_finetune_peft (line 239) | def test_finetune_peft(self, tmp_path, fake_embeddings, train_file, de... method test_finetune_peft_restart (line 267) | def test_finetune_peft_restart(self, tmp_path, fake_embeddings, train_... FILE: stanza/tests/classifiers/test_constituency_classifier.py class TestConstituencyClassifier (line 17) | class TestConstituencyClassifier: method constituency_model (line 19) | def constituency_model(self, fake_embeddings, tmp_path_factory): method build_model (line 27) | def build_model(self, tmp_path, constituency_model, fake_embeddings, t... method run_training (line 50) | def run_training(self, tmp_path, constituency_model, fake_embeddings, ... method test_build_model (line 63) | def test_build_model(self, tmp_path, constituency_model, fake_embeddin... method test_save_load (line 69) | def test_save_load(self, tmp_path, constituency_model, fake_embeddings... method test_train_basic (line 81) | def test_train_basic(self, tmp_path, constituency_model, fake_embeddin... method test_train_pipeline (line 84) | def test_train_pipeline(self, tmp_path, constituency_model, fake_embed... method test_train_all_words (line 112) | def test_train_all_words(self, tmp_path, constituency_model, fake_embe... method test_train_top_layer (line 117) | def test_train_top_layer(self, tmp_path, constituency_model, fake_embe... method test_train_attn (line 122) | def test_train_attn(self, tmp_path, constituency_model, fake_embedding... FILE: stanza/tests/classifiers/test_data.py function train_file (line 34) | def train_file(tmp_path_factory): function dev_file (line 42) | def dev_file(tmp_path_factory): function test_file (line 50) | def test_file(tmp_path_factory): function train_file_with_trees (line 58) | def train_file_with_trees(tmp_path_factory): function dev_file_with_trees (line 66) | def dev_file_with_trees(tmp_path_factory): class TestClassifierData (line 73) | class TestClassifierData: method test_read_data (line 74) | def test_read_data(self, train_file): method test_read_data_with_trees (line 81) | def test_read_data_with_trees(self, train_file, train_file_with_trees): method test_dataset_vocab (line 93) | def test_dataset_vocab(self, train_file): method test_dataset_labels (line 102) | def test_dataset_labels(self, train_file): method test_sort_by_length (line 110) | def test_sort_by_length(self, train_file): method test_check_labels (line 120) | def test_check_labels(self, train_file): FILE: stanza/tests/classifiers/test_process_utils.py function test_write_list (line 19) | def test_write_list(tmp_path, train_file): function test_write_dataset (line 31) | def test_write_dataset(tmp_path, train_file, dev_file, test_file): function test_read_snippets (line 46) | def test_read_snippets(tmp_path): function test_read_snippets_two_columns (line 64) | def test_read_snippets_two_columns(tmp_path): FILE: stanza/tests/common/test_bert_embedding.py function tiny_bert (line 11) | def tiny_bert(): function test_load_bert (line 15) | def test_load_bert(tiny_bert): function test_run_bert (line 21) | def test_run_bert(tiny_bert): function test_run_bert_empty_word (line 26) | def test_run_bert_empty_word(tiny_bert): FILE: stanza/tests/common/test_char_model.py class TestCharModel (line 30) | class TestCharModel: method test_single_file_vocab (line 31) | def test_single_file_vocab(self): method test_single_file_xz_vocab (line 42) | def test_single_file_xz_vocab(self): method test_single_file_dir_vocab (line 53) | def test_single_file_dir_vocab(self): method test_multiple_files_vocab (line 64) | def test_multiple_files_vocab(self): method test_cutoff_vocab (line 80) | def test_cutoff_vocab(self): method test_build_model (line 98) | def test_build_model(self): method english_forward (line 155) | def english_forward(self): method english_backward (line 165) | def english_backward(self): method test_load_model (line 174) | def test_load_model(self, english_forward, english_backward): method test_save_load_model (line 181) | def test_save_load_model(self, english_forward, english_backward): FILE: stanza/tests/common/test_chuliu_edmonds.py function test_tarjan_basic (line 14) | def test_tarjan_basic(): function test_tarjan_cycle (line 23) | def test_tarjan_cycle(): FILE: stanza/tests/common/test_common_data.py function test_augment_ratio (line 9) | def test_augment_ratio(): function test_augment_punct (line 27) | def test_augment_punct(): FILE: stanza/tests/common/test_confusion.py function simple_confusion (line 13) | def simple_confusion(): function short_confusion (line 23) | def short_confusion(): function test_simple_output (line 62) | def test_simple_output(simple_confusion): function test_short_output (line 65) | def test_short_output(short_confusion): function test_hide_blank_short_output (line 68) | def test_hide_blank_short_output(short_confusion): function test_macro_f1 (line 71) | def test_macro_f1(simple_confusion, short_confusion): function test_weighted_f1 (line 75) | def test_weighted_f1(simple_confusion, short_confusion): FILE: stanza/tests/common/test_constant.py function test_treebank (line 15) | def test_treebank(): function test_lang_to_langcode (line 41) | def test_lang_to_langcode(): function test_right_to_left (line 48) | def test_right_to_left(): function test_two_to_three (line 55) | def test_two_to_three(): function test_langlower (line 62) | def test_langlower(): FILE: stanza/tests/common/test_data_conversion.py function test_conll_to_dict (line 41) | def test_conll_to_dict(): function test_dict_to_conll (line 47) | def test_dict_to_conll(): function test_dict_to_doc_and_doc_to_dict (line 53) | def test_dict_to_doc_and_doc_to_dict(): function check_russian_doc (line 101) | def check_russian_doc(doc): function test_write_russian_doc (line 131) | def test_write_russian_doc(tmp_path): function test_write_to_io (line 171) | def test_write_to_io(): function test_write_doc2conll_append (line 179) | def test_write_doc2conll_append(tmp_path): function test_doc_with_comments (line 190) | def test_doc_with_comments(): function test_unusual_misc (line 197) | def test_unusual_misc(): function test_file (line 214) | def test_file(): function test_zip_file (line 225) | def test_zip_file(): function test_simple_ner_conversion (line 250) | def test_simple_ner_conversion(): function test_mwt_ner_conversion (line 283) | def test_mwt_ner_conversion(): function test_no_offsets_output (line 343) | def test_no_offsets_output(): function test_deps_conversion (line 376) | def test_deps_conversion(): function test_empty_deps_conversion (line 413) | def test_empty_deps_conversion(): function test_empty_deps_at_end_conversion (line 419) | def test_empty_deps_at_end_conversion(): function check_empty_deps_conversion (line 425) | def check_empty_deps_conversion(input_str, expected_words): function test_read_doc_id (line 463) | def test_read_doc_id(): function test_read_dependency_errors (line 480) | def test_read_dependency_errors(): function test_read_multiple_doc_ids (line 537) | def test_read_multiple_doc_ids(): function test_convert_dict (line 560) | def test_convert_dict(): function test_line_numbers (line 571) | def test_line_numbers(): function test_speaker (line 601) | def test_speaker(): FILE: stanza/tests/common/test_data_objects.py function nlp_pipeline (line 20) | def nlp_pipeline(): function test_readonly (line 24) | def test_readonly(nlp_pipeline): function test_getter (line 32) | def test_getter(nlp_pipeline): function test_setter_getter (line 39) | def test_setter_getter(nlp_pipeline): function test_backpointer (line 55) | def test_backpointer(nlp_pipeline): FILE: stanza/tests/common/test_doc.py function sentences_dict (line 10) | def sentences_dict(): function doc (line 18) | def doc(sentences_dict): function test_basic_values (line 22) | def test_basic_values(doc, sentences_dict): function test_set_sentence (line 34) | def test_set_sentence(doc): function test_set_tokens (line 45) | def test_set_tokens(doc): function test_constituency_comment (line 58) | def test_constituency_comment(doc): function test_sentiment_comment (line 87) | def test_sentiment_comment(doc): function test_sent_id_comment (line 116) | def test_sent_id_comment(doc): function test_doc_id_comment (line 139) | def test_doc_id_comment(doc): function pipeline (line 156) | def pipeline(): function test_serialized (line 159) | def test_serialized(pipeline): FILE: stanza/tests/common/test_dropout.py function test_word_dropout (line 10) | def test_word_dropout(): FILE: stanza/tests/common/test_foundation_cache.py function test_charlm_cache (line 14) | def test_charlm_cache(): FILE: stanza/tests/common/test_pretrain.py function check_vocab (line 14) | def check_vocab(vocab): function check_embedding (line 21) | def check_embedding(emb, unk=False): function check_pretrain (line 33) | def check_pretrain(pt): function test_text_pretrain (line 37) | def test_text_pretrain(): function test_xz_pretrain (line 41) | def test_xz_pretrain(): function test_gz_pretrain (line 45) | def test_gz_pretrain(): function test_zip_pretrain (line 49) | def test_zip_pretrain(): function test_csv_pretrain (line 53) | def test_csv_pretrain(): function test_resave_pretrain (line 57) | def test_resave_pretrain(): function test_whitespace (line 86) | def test_whitespace(): function test_no_header (line 112) | def test_no_header(): function test_no_header (line 130) | def test_no_header(): FILE: stanza/tests/common/test_relative_attn.py function test_attn (line 10) | def test_attn(): function test_shorter_sequence (line 22) | def test_shorter_sequence(): function test_reverse (line 35) | def test_reverse(): FILE: stanza/tests/common/test_short_name_to_treebank.py function test_short_name (line 8) | def test_short_name(): function test_canonical_name (line 11) | def test_canonical_name(): FILE: stanza/tests/common/test_utils.py function test_wordvec_not_found (line 13) | def test_wordvec_not_found(): function test_word2vec_xz (line 22) | def test_word2vec_xz(): function test_fasttext_txt (line 40) | def test_fasttext_txt(): function test_wordvec_type (line 58) | def test_wordvec_type(): function test_sort_with_indices (line 80) | def test_sort_with_indices(): function test_empty_sort_with_indices (line 89) | def test_empty_sort_with_indices(): function test_split_into_batches (line 98) | def test_split_into_batches(): function test_find_missing_tags (line 130) | def test_find_missing_tags(): function test_open_read_text (line 136) | def test_open_read_text(): function test_checkpoint_name (line 181) | def test_checkpoint_name(): function test_punct_simplification (line 195) | def test_punct_simplification(): FILE: stanza/tests/constituency/test_convert_arboretum.py function test_projective_example (line 163) | def test_projective_example(): function test_not_fix_example (line 197) | def test_not_fix_example(): function test_fix_proj_example (line 214) | def test_fix_proj_example(): FILE: stanza/tests/constituency/test_convert_it_vit.py function test_process_mwts (line 168) | def test_process_mwts(): function test_raw_tree (line 178) | def test_raw_tree(): function test_update_mwts (line 190) | def test_update_mwts(): function test_read_percent (line 219) | def test_read_percent(): FILE: stanza/tests/constituency/test_convert_starlang.py function test_read_tree (line 16) | def test_read_tree(): function test_missing_word (line 23) | def test_missing_word(): function test_bad_label (line 31) | def test_bad_label(): FILE: stanza/tests/constituency/test_ensemble.py function pipeline (line 21) | def pipeline(): function saved_ensemble (line 25) | def saved_ensemble(tmp_path_factory, pipeline): function check_basic_predictions (line 44) | def check_basic_predictions(trees): function test_ensemble_inference (line 54) | def test_ensemble_inference(pipeline): function test_ensemble_save (line 71) | def test_ensemble_save(saved_ensemble): function test_ensemble_save_load (line 79) | def test_ensemble_save_load(pipeline, saved_ensemble): function test_parse_text (line 86) | def test_parse_text(tmp_path, pipeline, saved_ensemble): function test_pipeline (line 105) | def test_pipeline(saved_ensemble): FILE: stanza/tests/constituency/test_in_order_compound_oracle.py function trees (line 35) | def trees(): function gold_sequences (line 43) | def gold_sequences(trees): function get_repairs (line 47) | def get_repairs(gold_sequence, wrong_transition, repair_fn): function test_fix_shift_close (line 59) | def test_fix_shift_close(): function test_fix_open_close (line 80) | def test_fix_open_close(): FILE: stanza/tests/constituency/test_in_order_oracle.py function get_repairs (line 119) | def get_repairs(gold_sequence, wrong_transition, repair_fn): function unary_trees (line 132) | def unary_trees(): function gold_sequences (line 140) | def gold_sequences(unary_trees): function wide_trees (line 145) | def wide_trees(): function test_wrong_open_root (line 152) | def test_wrong_open_root(gold_sequences): function test_missed_unary (line 177) | def test_missed_unary(gold_sequences): function test_open_with_stuff (line 222) | def test_open_with_stuff(unary_trees, gold_sequences): function test_general_open (line 240) | def test_general_open(gold_sequences): function test_missed_unary (line 252) | def test_missed_unary(unary_trees, gold_sequences): function test_open_shift (line 285) | def test_open_shift(unary_trees, gold_sequences): function test_open_close (line 314) | def test_open_close(unary_trees, gold_sequences): function test_shift_close (line 347) | def test_shift_close(unary_trees, gold_sequences): function test_close_open_shift_nested (line 385) | def test_close_open_shift_nested(unary_trees, gold_sequences): function check_repairs (line 403) | def check_repairs(trees, gold_sequences, expected_trees, transition, rep... function test_close_open_shift_unambiguous (line 428) | def test_close_open_shift_unambiguous(unary_trees, gold_sequences): function test_close_open_shift_ambiguous_early (line 438) | def test_close_open_shift_ambiguous_early(unary_trees, gold_sequences): function test_close_open_shift_ambiguous_late (line 448) | def test_close_open_shift_ambiguous_late(unary_trees, gold_sequences): function test_close_shift_shift (line 459) | def test_close_shift_shift(unary_trees, wide_trees): function test_close_shift_shift_early (line 480) | def test_close_shift_shift_early(unary_trees, wide_trees): function test_close_shift_shift_late (line 502) | def test_close_shift_shift_late(unary_trees, wide_trees): FILE: stanza/tests/constituency/test_lstm_model.py function pretrain_file (line 16) | def pretrain_file(): function build_model (line 19) | def build_model(pretrain_file, *args): function unary_model (line 26) | def unary_model(pretrain_file): function test_initial_state (line 29) | def test_initial_state(unary_model): function test_shift (line 32) | def test_shift(pretrain_file): function test_unary (line 38) | def test_unary(unary_model): function test_unary_requires_root (line 41) | def test_unary_requires_root(unary_model): function test_open (line 44) | def test_open(unary_model): function test_compound_open (line 47) | def test_compound_open(pretrain_file): function test_in_order_open (line 51) | def test_in_order_open(pretrain_file): function test_close (line 55) | def test_close(unary_model): function run_forward_checks (line 58) | def run_forward_checks(model, num_states=1): function test_unary_forward (line 96) | def test_unary_forward(unary_model): function test_lstm_forward (line 104) | def test_lstm_forward(pretrain_file): function test_lstm_layers (line 109) | def test_lstm_layers(pretrain_file): function test_multiple_output_forward (line 117) | def test_multiple_output_forward(pretrain_file): function test_no_tag_embedding_forward (line 130) | def test_no_tag_embedding_forward(pretrain_file): function test_forward_combined_dummy (line 140) | def test_forward_combined_dummy(pretrain_file): function test_nonlinearity_init (line 150) | def test_nonlinearity_init(pretrain_file): function test_forward_charlm (line 163) | def test_forward_charlm(pretrain_file): function test_forward_bert (line 181) | def test_forward_bert(pretrain_file): function test_forward_xlnet (line 191) | def test_forward_xlnet(pretrain_file): function test_forward_sentence_boundaries (line 201) | def test_forward_sentence_boundaries(pretrain_file): function test_forward_constituency_composition (line 214) | def test_forward_constituency_composition(pretrain_file): function test_forward_key_position (line 248) | def test_forward_key_position(pretrain_file): function test_forward_attn_hidden_size (line 265) | def test_forward_attn_hidden_size(pretrain_file): function test_forward_partitioned_attention (line 278) | def test_forward_partitioned_attention(pretrain_file): function test_forward_labeled_attention (line 288) | def test_forward_labeled_attention(pretrain_file): function test_lattn_partitioned (line 301) | def test_lattn_partitioned(pretrain_file): function test_lattn_projection (line 309) | def test_lattn_projection(pretrain_file): function test_forward_timing_choices (line 329) | def test_forward_timing_choices(pretrain_file): function test_transition_stack (line 339) | def test_transition_stack(pretrain_file): function test_constituent_stack (line 358) | def test_constituent_stack(pretrain_file): function test_different_transition_sizes (line 377) | def test_different_transition_sizes(pretrain_file): function test_relative_attention (line 417) | def test_relative_attention(pretrain_file): function test_relative_attention_cat (line 421) | def test_relative_attention_cat(pretrain_file): function test_relative_attention_directional (line 431) | def test_relative_attention_directional(pretrain_file): function test_relative_attention_sinks (line 438) | def test_relative_attention_sinks(pretrain_file): function test_relative_attention_cat_sinks (line 448) | def test_relative_attention_cat_sinks(pretrain_file): function test_relative_attention_endpoint_sinks (line 458) | def test_relative_attention_endpoint_sinks(pretrain_file): function test_lstm_tree_forward (line 468) | def test_lstm_tree_forward(pretrain_file): function test_lstm_tree_cx_forward (line 479) | def test_lstm_tree_cx_forward(pretrain_file): function test_maxout (line 490) | def test_maxout(pretrain_file): function check_structure_test (line 508) | def check_structure_test(pretrain_file, args1, args2): function test_copy_with_new_structure_same (line 554) | def test_copy_with_new_structure_same(pretrain_file): function test_copy_with_new_structure_untied (line 562) | def test_copy_with_new_structure_untied(pretrain_file): function test_copy_with_new_structure_pattn (line 570) | def test_copy_with_new_structure_pattn(pretrain_file): function test_copy_with_new_structure_both (line 575) | def test_copy_with_new_structure_both(pretrain_file): function test_copy_with_new_structure_lattn (line 580) | def test_copy_with_new_structure_lattn(pretrain_file): function test_parse_tagged_words (line 585) | def test_parse_tagged_words(pretrain_file): FILE: stanza/tests/constituency/test_parse_transitions.py function build_initial_state (line 11) | def build_initial_state(model, num_states=1): function test_initial_state (line 21) | def test_initial_state(model=None): function test_shift (line 36) | def test_shift(model=None): function test_initial_unary (line 82) | def test_initial_unary(model=None): function test_unary (line 96) | def test_unary(model=None): function test_unary_requires_root (line 120) | def test_unary_requires_root(model=None): function test_open (line 154) | def test_open(model=None): function test_compound_open (line 183) | def test_compound_open(model=None): function test_in_order_open (line 209) | def test_in_order_open(model=None): function test_too_many_unaries_close (line 256) | def test_too_many_unaries_close(): function test_too_many_unaries_open (line 282) | def test_too_many_unaries_open(): function test_close (line 313) | def test_close(model=None): function test_in_order_compound_finalize (line 367) | def test_in_order_compound_finalize(model=None): function test_hashes (line 408) | def test_hashes(): function test_sort (line 455) | def test_sort(): function test_check_transitions (line 470) | def test_check_transitions(): FILE: stanza/tests/constituency/test_parse_tree.py function test_leaf_preterminal (line 10) | def test_leaf_preterminal(): function test_yield_preterminals (line 30) | def test_yield_preterminals(): function test_depth (line 38) | def test_depth(): function test_unique_labels (line 44) | def test_unique_labels(): function test_unique_tags (line 58) | def test_unique_tags(): function test_unique_words (line 71) | def test_unique_words(): function test_rare_words (line 83) | def test_rare_words(): function test_common_words (line 95) | def test_common_words(): function test_root_labels (line 107) | def test_root_labels(): function test_prune_none (line 122) | def test_prune_none(): function test_simplify_labels (line 136) | def test_simplify_labels(): function test_remap_constituent_labels (line 144) | def test_remap_constituent_labels(): function test_remap_constituent_words (line 154) | def test_remap_constituent_words(): function test_replace_words (line 164) | def test_replace_words(): function test_compound_constituents (line 176) | def test_compound_constituents(): function test_equals (line 190) | def test_equals(): function test_count_unaries (line 290) | def test_count_unaries(): function test_str_bracket_labels (line 299) | def test_str_bracket_labels(): function test_all_leaves_are_preterminals (line 307) | def test_all_leaves_are_preterminals(): function test_latex (line 318) | def test_latex(): function test_pretty_print (line 328) | def test_pretty_print(): function test_reverse (line 364) | def test_reverse(): FILE: stanza/tests/constituency/test_positional_encoding.py function test_positional_encoding (line 13) | def test_positional_encoding(): function test_resize (line 19) | def test_resize(): function test_arange (line 25) | def test_arange(): function test_add (line 31) | def test_add(): FILE: stanza/tests/constituency/test_selftrain_vi_quad.py function test_read_file (line 21) | def test_read_file(): FILE: stanza/tests/constituency/test_text_processing.py function pipeline (line 20) | def pipeline(): function test_read_tokenized_file (line 23) | def test_read_tokenized_file(tmp_path): function test_parse_tokenized_sentences (line 32) | def test_parse_tokenized_sentences(pipeline): function test_parse_text (line 47) | def test_parse_text(tmp_path, pipeline): function test_parse_dir (line 64) | def test_parse_dir(tmp_path, pipeline): function test_parse_text (line 89) | def test_parse_text(tmp_path, pipeline): FILE: stanza/tests/constituency/test_top_down_oracle.py function get_single_repair (line 26) | def get_single_repair(gold_sequence, wrong_transition, repair_fn, idx, *... function build_state (line 29) | def build_state(model, tree, num_transitions): function test_fix_open_shift (line 38) | def test_fix_open_shift(): function test_fix_open_shift_observed_error (line 56) | def test_fix_open_shift_observed_error(): function test_open_open_ambiguous_unary_fix (line 100) | def test_open_open_ambiguous_unary_fix(): function test_open_open_ambiguous_later_fix (line 113) | def test_open_open_ambiguous_later_fix(): function test_fix_close_shift_ambiguous_immediate (line 153) | def test_fix_close_shift_ambiguous_immediate(): function test_fix_close_shift_ambiguous_later (line 168) | def test_fix_close_shift_ambiguous_later(): function test_oracle_with_optional_level (line 181) | def test_oracle_with_optional_level(): function test_fix_close_shift (line 207) | def test_fix_close_shift(): function test_fix_close_shift_deeper_tree (line 233) | def test_fix_close_shift_deeper_tree(): function test_fix_close_shift_open_tree (line 251) | def test_fix_close_shift_open_tree(): function test_fix_close_open (line 290) | def test_fix_close_open(): function test_fix_close_open_invalid (line 308) | def test_fix_close_open_invalid(): function test_fix_close_open_ambiguous_immediate (line 322) | def test_fix_close_open_ambiguous_immediate(): function test_fix_close_open_ambiguous_later (line 349) | def test_fix_close_open_ambiguous_later(): function test_shift_close (line 387) | def test_shift_close(): function test_shift_open_ambiguous_unary (line 413) | def test_shift_open_ambiguous_unary(): function test_shift_open_ambiguous_later (line 429) | def test_shift_open_ambiguous_later(): FILE: stanza/tests/constituency/test_trainer.py function build_trainer (line 61) | def build_trainer(wordvec_pretrain_file, *args, treebank=TREEBANK): class TestTrainer (line 78) | class TestTrainer: method wordvec_pretrain_file (line 80) | def wordvec_pretrain_file(self): method tiny_random_xlnet (line 84) | def tiny_random_xlnet(self, tmp_path_factory): method tiny_random_bart (line 103) | def tiny_random_bart(self, tmp_path_factory): method test_initial_model (line 116) | def test_initial_model(self, wordvec_pretrain_file): method test_save_load_model (line 124) | def test_save_load_model(self, wordvec_pretrain_file): method test_relearn_structure (line 147) | def test_relearn_structure(self, wordvec_pretrain_file): method write_treebanks (line 170) | def write_treebanks(self, tmpdirname): method training_args (line 182) | def training_args(self, wordvec_pretrain_file, tmpdirname, train_treeb... method run_train_test (line 196) | def run_train_test(self, wordvec_pretrain_file, tmpdirname, num_epochs... method test_train (line 250) | def test_train(self, wordvec_pretrain_file): method test_early_dropout (line 257) | def test_early_dropout(self, wordvec_pretrain_file): method test_train_silver (line 280) | def test_train_silver(self, wordvec_pretrain_file): method test_train_checkpoint (line 291) | def test_train_checkpoint(self, wordvec_pretrain_file): method run_multistage_tests (line 317) | def run_multistage_tests(self, wordvec_pretrain_file, tmpdirname, use_... method test_multistage_lattn (line 348) | def test_multistage_lattn(self, wordvec_pretrain_file): method test_multistage_no_lattn (line 357) | def test_multistage_no_lattn(self, wordvec_pretrain_file): method test_multistage_optimizer (line 366) | def test_multistage_optimizer(self, wordvec_pretrain_file): method test_grad_clip_hooks (line 393) | def test_grad_clip_hooks(self, wordvec_pretrain_file): method test_analyze_trees (line 401) | def test_analyze_trees(self, wordvec_pretrain_file): method bert_weights_allclose (line 432) | def bert_weights_allclose(self, bert_model, parser_model): method frozen_transformer_test (line 443) | def frozen_transformer_test(self, wordvec_pretrain_file, transformer_n... method test_bert_frozen (line 462) | def test_bert_frozen(self, wordvec_pretrain_file): method test_xlnet_frozen (line 468) | def test_xlnet_frozen(self, wordvec_pretrain_file, tiny_random_xlnet): method test_bart_frozen (line 474) | def test_bart_frozen(self, wordvec_pretrain_file, tiny_random_bart): method test_bert_finetune_one_epoch (line 480) | def test_bert_finetune_one_epoch(self, wordvec_pretrain_file): method finetune_transformer_test (line 512) | def finetune_transformer_test(self, wordvec_pretrain_file, transformer... method test_bert_finetune (line 532) | def test_bert_finetune(self, wordvec_pretrain_file): method test_xlnet_finetune (line 538) | def test_xlnet_finetune(self, wordvec_pretrain_file, tiny_random_xlnet): method test_stage1_bert_finetune (line 544) | def test_stage1_bert_finetune(self, wordvec_pretrain_file): method one_layer_finetune_transformer_test (line 582) | def one_layer_finetune_transformer_test(self, wordvec_pretrain_file, t... method test_bert_finetune_one_layer (line 608) | def test_bert_finetune_one_layer(self, wordvec_pretrain_file): method test_xlnet_finetune_one_layer (line 611) | def test_xlnet_finetune_one_layer(self, wordvec_pretrain_file, tiny_ra... method test_peft_finetune (line 614) | def test_peft_finetune(self, tmp_path, wordvec_pretrain_file): method test_peft_twostage_finetune (line 619) | def test_peft_twostage_finetune(self, wordvec_pretrain_file): FILE: stanza/tests/constituency/test_transformer_tree_stack.py function test_initial_state (line 9) | def test_initial_state(): function test_output (line 20) | def test_output(): function test_push_state_single (line 30) | def test_push_state_single(): function test_push_state_same_length (line 47) | def test_push_state_same_length(): function test_push_state_different_length (line 69) | def test_push_state_different_length(): function test_mask (line 89) | def test_mask(): function test_position (line 121) | def test_position(): function test_length_limit (line 139) | def test_length_limit(): function test_two_heads (line 171) | def test_two_heads(): FILE: stanza/tests/constituency/test_transition_sequence.py function reconstruct_tree (line 13) | def reconstruct_tree(tree, sequence, transition_scheme=TransitionScheme.... function check_reproduce_tree (line 32) | def check_reproduce_tree(transition_scheme): function test_top_down_unary (line 61) | def test_top_down_unary(): function test_top_down_no_unary (line 64) | def test_top_down_no_unary(): function test_in_order (line 67) | def test_in_order(): function test_in_order_compound (line 70) | def test_in_order_compound(): function test_in_order_unary (line 73) | def test_in_order_unary(): function test_all_transitions (line 76) | def test_all_transitions(): function test_all_transitions_no_unary (line 86) | def test_all_transitions_no_unary(): function test_top_down_compound_unary (line 95) | def test_top_down_compound_unary(): function test_chinese_tree (line 116) | def test_chinese_tree(): function test_chinese_tree_reversed (line 131) | def test_chinese_tree_reversed(): FILE: stanza/tests/constituency/test_tree_reader.py function test_simple (line 9) | def test_simple(): function test_newlines (line 23) | def test_newlines(): function test_parens (line 31) | def test_parens(): function test_complicated (line 47) | def test_complicated(): function test_one_word (line 64) | def test_one_word(): function test_missing_close_parens (line 80) | def test_missing_close_parens(): function test_mixed_tree (line 91) | def test_mixed_tree(): function test_unlabeled_tree (line 105) | def test_unlabeled_tree(): FILE: stanza/tests/constituency/test_tree_stack.py function test_simple (line 9) | def test_simple(): function test_iter (line 20) | def test_iter(): function test_str (line 28) | def test_str(): function test_len (line 35) | def test_len(): function test_long_len (line 43) | def test_long_len(): FILE: stanza/tests/constituency/test_utils.py function pipeline (line 13) | def pipeline(): function test_xpos_retag (line 18) | def test_xpos_retag(pipeline): function test_upos_retag (line 32) | def test_upos_retag(pipeline): function test_replace_tags (line 45) | def test_replace_tags(): FILE: stanza/tests/constituency/test_vietnamese.py function test_read_vi_tree (line 33) | def test_read_vi_tree(): function test_vi_embedding (line 55) | def test_vi_embedding(): function test_space_formatting (line 77) | def test_space_formatting(): function test_vlsp_formatting (line 89) | def test_vlsp_formatting(): function test_language_formatting (line 109) | def test_language_formatting(): FILE: stanza/tests/datasets/coref/test_hebrew_iahlt.py function tokenizer (line 10) | def tokenizer(): function test_extract_doc (line 31) | def test_extract_doc(tokenizer): FILE: stanza/tests/datasets/ner/test_prepare_ner_file.py function check_json_file (line 35) | def check_json_file(doc, raw_text, expected_sentences, expected_tokens): function write_and_convert (line 52) | def write_and_convert(tmp_path, raw_text): function run_test (line 65) | def run_test(tmp_path, raw_text, expected_sentences, expected_tokens): function test_simple (line 69) | def test_simple(tmp_path): function test_ner_at_end (line 72) | def test_ner_at_end(tmp_path): function test_two_sentences (line 75) | def test_two_sentences(tmp_path): FILE: stanza/tests/datasets/ner/test_utils.py function test_list_doc_entities (line 10) | def test_list_doc_entities(tmp_path): FILE: stanza/tests/datasets/test_common.py function test_fake_deps_no_change (line 65) | def test_fake_deps_no_change(): function test_fake_deps_all_tokens (line 69) | def test_fake_deps_all_tokens(): function test_fake_deps_only_root (line 74) | def test_fake_deps_only_root(): FILE: stanza/tests/datasets/test_vietnamese_renormalization.py function test_replace_all (line 8) | def test_replace_all(): function test_replace_file (line 14) | def test_replace_file(tmp_path): FILE: stanza/tests/depparse/test_depparse_data.py function make_fake_data (line 11) | def make_fake_data(*lengths): function check_batches (line 19) | def check_batches(batched_data, expected_sizes, expected_order): function test_data_to_batches_eval_mode (line 28) | def test_data_to_batches_eval_mode(): function test_punct_simplification (line 93) | def test_punct_simplification(): FILE: stanza/tests/depparse/test_parser.py class TestParser (line 76) | class TestParser: method wordvec_pretrain_file (line 78) | def wordvec_pretrain_file(self): method run_training (line 81) | def run_training(self, tmp_path, wordvec_pretrain_file, train_text, de... method test_train (line 129) | def test_train(self, tmp_path, wordvec_pretrain_file): method test_arc_embedding (line 135) | def test_arc_embedding(self, tmp_path, wordvec_pretrain_file): method test_no_arc_embedding (line 141) | def test_no_arc_embedding(self, tmp_path, wordvec_pretrain_file): method test_zipfile_train (line 147) | def test_zipfile_train(self, tmp_path, wordvec_pretrain_file): method test_with_bert_nlayers (line 153) | def test_with_bert_nlayers(self, tmp_path, wordvec_pretrain_file): method test_with_bert_finetuning (line 156) | def test_with_bert_finetuning(self, tmp_path, wordvec_pretrain_file): method test_with_bert_finetuning_resaved (line 161) | def test_with_bert_finetuning_resaved(self, tmp_path, wordvec_pretrain... method test_with_peft (line 187) | def test_with_peft(self, tmp_path, wordvec_pretrain_file): method test_single_optimizer_checkpoint (line 192) | def test_single_optimizer_checkpoint(self, tmp_path, wordvec_pretrain_... method test_two_optimizers_checkpoint (line 214) | def test_two_optimizers_checkpoint(self, tmp_path, wordvec_pretrain_fi... FILE: stanza/tests/langid/test_langid.py function basic_multilingual (line 17) | def basic_multilingual(): function enfr_multilingual (line 21) | def enfr_multilingual(): function en_multilingual (line 25) | def en_multilingual(): function clean_multilingual (line 29) | def clean_multilingual(): function test_langid (line 32) | def test_langid(basic_multilingual): function test_langid_benchmark (line 45) | def test_langid_benchmark(basic_multilingual): function test_text_cleaning (line 558) | def test_text_cleaning(basic_multilingual, clean_multilingual): function test_emoji_cleaning (line 573) | def test_emoji_cleaning(): function test_lang_subset (line 581) | def test_lang_subset(basic_multilingual, enfr_multilingual, en_multiling... function test_lang_subset_unlikely_language (line 600) | def test_lang_subset_unlikely_language(en_multilingual): FILE: stanza/tests/langid/test_multilingual.py function run_multilingual_pipeline (line 15) | def run_multilingual_pipeline(en_has_dependencies=True, fr_has_dependenc... function test_multilingual_pipeline (line 62) | def test_multilingual_pipeline(): function test_multilingual_pipeline_small_cache (line 68) | def test_multilingual_pipeline_small_cache(): function test_multilingual_config (line 75) | def test_multilingual_config(): function test_multilingual_processors_limited (line 85) | def test_multilingual_processors_limited(): function test_defaultdict_config (line 95) | def test_defaultdict_config(): FILE: stanza/tests/lemma/test_data.py function test_load_document (line 83) | def test_load_document(): function test_load_goeswith (line 93) | def test_load_goeswith(): function test_correct_form (line 104) | def test_correct_form(): function test_load_blank (line 118) | def test_load_blank(): FILE: stanza/tests/lemma/test_lemma_trainer.py function english_model (line 21) | def english_model(): function test_load_model (line 31) | def test_load_model(english_model): function test_save_load_model (line 36) | def test_save_load_model(english_model): class TestLemmatizer (line 98) | class TestLemmatizer: method charlm_args (line 100) | def charlm_args(self): method run_training (line 106) | def run_training(self, tmp_path, train_text, dev_text, extra_args=None): method test_basic_train (line 139) | def test_basic_train(self, tmp_path): method test_charlm_train (line 145) | def test_charlm_train(self, tmp_path, charlm_args): FILE: stanza/tests/lemma/test_lowercase.py function test_all_lowercase (line 51) | def test_all_lowercase(): function test_not_all_lowercase (line 55) | def test_not_all_lowercase(): FILE: stanza/tests/lemma_classifier/test_data_preparation.py function write_test_dataset (line 186) | def write_test_dataset(tmp_path, texts, datasets): function write_english_test_dataset (line 203) | def write_english_test_dataset(tmp_path): function convert_english_dataset (line 208) | def convert_english_dataset(tmp_path): function test_convert_one_sentence (line 215) | def test_convert_one_sentence(tmp_path): function test_convert_dataset (line 234) | def test_convert_dataset(tmp_path): FILE: stanza/tests/lemma_classifier/test_training.py function pretrain_file (line 17) | def pretrain_file(): function test_train_lstm (line 20) | def test_train_lstm(tmp_path, pretrain_file): function test_train_transformer (line 37) | def test_train_transformer(tmp_path, pretrain_file): FILE: stanza/tests/morphseg/conftest.py function english_segmenter (line 11) | def english_segmenter(): function all_segmenters (line 19) | def all_segmenters(): function pytest_configure (line 29) | def pytest_configure(config): FILE: stanza/tests/morphseg/test_integration.py class TestIntegration (line 10) | class TestIntegration: method test_full_pipeline (line 12) | def test_full_pipeline(self): method test_consistency_across_modes (line 26) | def test_consistency_across_modes(self): method test_unicode_handling (line 41) | def test_unicode_handling(self): method test_mixed_case (line 51) | def test_mixed_case(self): FILE: stanza/tests/morphseg/test_morpheme_segmenter.py class TestMorphemeSegmenter (line 10) | class TestMorphemeSegmenter: method english_segmenter (line 13) | def english_segmenter(self): method test_basic_segmentation (line 17) | def test_basic_segmentation(self, english_segmenter): method test_multiple_words (line 26) | def test_multiple_words(self, english_segmenter): method test_known_segmentations (line 36) | def test_known_segmentations(self, english_segmenter): method test_output_string_mode (line 48) | def test_output_string_mode(self, english_segmenter): method test_custom_delimiter (line 55) | def test_custom_delimiter(self, english_segmenter): method test_empty_input (line 62) | def test_empty_input(self, english_segmenter): method test_single_character (line 70) | def test_single_character(self, english_segmenter): method test_punctuation (line 78) | def test_punctuation(self, english_segmenter): class TestDeterminism (line 87) | class TestDeterminism: method test_deterministic_predictions (line 92) | def test_deterministic_predictions(self): method test_deterministic_batch (line 109) | def test_deterministic_batch(self): class TestMultilingual (line 126) | class TestMultilingual: method test_language_loading (line 129) | def test_language_loading(self, lang): method test_multilingual_segmentation (line 141) | def test_multilingual_segmentation(self, lang, word): class TestErrorHandling (line 153) | class TestErrorHandling: method test_invalid_language (line 155) | def test_invalid_language(self): method test_invalid_input_type (line 161) | def test_invalid_input_type(self): method test_invalid_output_string_type (line 171) | def test_invalid_output_string_type(self): method test_invalid_delimiter_type (line 178) | def test_invalid_delimiter_type(self): method test_model_not_trained (line 185) | def test_model_not_trained(self): class TestModelState (line 194) | class TestModelState: method test_model_in_eval_mode (line 199) | def test_model_in_eval_mode(self): method test_model_stays_in_eval_mode (line 207) | def test_model_stays_in_eval_mode(self): FILE: stanza/tests/morphseg/test_stanza_integration.py class TestMorphSegProcessor (line 13) | class TestMorphSegProcessor: method en_pipeline (line 17) | def en_pipeline(self): method test_processor_loads (line 26) | def test_processor_loads(self, en_pipeline): method test_basic_segmentation (line 31) | def test_basic_segmentation(self, en_pipeline): method test_known_segmentations (line 43) | def test_known_segmentations(self, en_pipeline): method test_segmentation_consistency (line 59) | def test_segmentation_consistency(self, en_pipeline): method test_multiple_words (line 77) | def test_multiple_words(self, en_pipeline): method test_punctuation_handling (line 88) | def test_punctuation_handling(self, en_pipeline): method test_long_text (line 100) | def test_long_text(self, en_pipeline): method test_empty_input (line 117) | def test_empty_input(self, en_pipeline): method test_single_character (line 122) | def test_single_character(self, en_pipeline): method test_morphemes_attribute_persistence (line 130) | def test_morphemes_attribute_persistence(self, en_pipeline): class TestMultilingualMorphSeg (line 147) | class TestMultilingualMorphSeg: method test_multilingual_support (line 157) | def test_multilingual_support(self, lang, text, expected_word): class TestMorphSegWithOtherProcessors (line 178) | class TestMorphSegWithOtherProcessors: method test_with_mwt (line 181) | def test_with_mwt(self): method test_with_pos (line 195) | def test_with_pos(self): method test_with_lemma (line 215) | def test_with_lemma(self): class TestMorphSegDeterminism (line 236) | class TestMorphSegDeterminism: method test_deterministic_results (line 239) | def test_deterministic_results(self): method test_batch_determinism (line 260) | def test_batch_determinism(self): class TestMorphSegEdgeCases (line 288) | class TestMorphSegEdgeCases: method en_pipeline (line 292) | def en_pipeline(self): method test_numbers (line 300) | def test_numbers(self, en_pipeline): method test_mixed_case (line 308) | def test_mixed_case(self, en_pipeline): method test_unicode_characters (line 321) | def test_unicode_characters(self, en_pipeline): method test_special_characters (line 330) | def test_special_characters(self, en_pipeline): method test_very_long_word (line 338) | def test_very_long_word(self, en_pipeline): method test_repeated_words (line 347) | def test_repeated_words(self, en_pipeline): method test_whitespace_handling (line 355) | def test_whitespace_handling(self, en_pipeline): class TestMorphSegConfiguration (line 368) | class TestMorphSegConfiguration: method test_custom_model_path (line 371) | def test_custom_model_path(self): method test_custom_model_path_with_file (line 384) | def test_custom_model_path_with_file(self): method test_processor_requirements (line 390) | def test_processor_requirements(self): class TestMorphSegOutputFormat (line 403) | class TestMorphSegOutputFormat: method en_pipeline (line 407) | def en_pipeline(self): method test_morphemes_is_list (line 415) | def test_morphemes_is_list(self, en_pipeline): method test_morphemes_are_strings (line 423) | def test_morphemes_are_strings(self, en_pipeline): method test_morphemes_non_empty (line 432) | def test_morphemes_non_empty(self, en_pipeline): method test_unsegmented_words (line 440) | def test_unsegmented_words(self, en_pipeline): class TestMorphSegRepeatedly (line 453) | class TestMorphSegRepeatedly: method test_sequential_document_processing (line 456) | def test_sequential_document_processing(self): method test_multi_sentence_document (line 477) | def test_multi_sentence_document(self): FILE: stanza/tests/mwt/test_character_classifier.py function test_train (line 50) | def test_train(tmp_path): FILE: stanza/tests/mwt/test_english_corner_cases.py function test_mwt_unknown_char (line 21) | def test_mwt_unknown_char(): function test_english_mwt_casing (line 50) | def test_english_mwt_casing(): FILE: stanza/tests/mwt/test_prepare_mwt.py function test_check_mwt_composition (line 58) | def test_check_mwt_composition(tmp_path): FILE: stanza/tests/mwt/test_utils.py function pipeline (line 15) | def pipeline(): function test_resplit_keep_tokens (line 22) | def test_resplit_keep_tokens(pipeline): function test_resplit_no_keep_tokens (line 44) | def test_resplit_no_keep_tokens(pipeline): FILE: stanza/tests/ner/test_bsf_2_beios.py class TestBsf2Beios (line 11) | class TestBsf2Beios(unittest.TestCase): method test_empty_markup (line 13) | def test_empty_markup(self): method test_1line_markup (line 17) | def test_1line_markup(self): method test_1line_follow_markup (line 24) | def test_1line_follow_markup(self): method test_1line_2tok_markup (line 32) | def test_1line_2tok_markup(self): method test_1line_Long_tok_markup (line 41) | def test_1line_Long_tok_markup(self): method test_2line_2tok_markup (line 53) | def test_2line_2tok_markup(self): method test_real_markup (line 75) | def test_real_markup(self): class TestBsf (line 308) | class TestBsf(unittest.TestCase): method test_empty_bsf (line 310) | def test_empty_bsf(self): method test_empty2_bsf (line 313) | def test_empty2_bsf(self): method test_1line_bsf (line 316) | def test_1line_bsf(self): method test_2line_bsf (line 323) | def test_2line_bsf(self): method test_multiline_bsf (line 332) | def test_multiline_bsf(self): FILE: stanza/tests/ner/test_bsf_2_iob.py class TestBsf2Iob (line 11) | class TestBsf2Iob(unittest.TestCase): method test_1line_follow_markup_iob (line 13) | def test_1line_follow_markup_iob(self): method test_1line_2tok_markup_iob (line 21) | def test_1line_2tok_markup_iob(self): method test_1line_Long_tok_markup_iob (line 30) | def test_1line_Long_tok_markup_iob(self): method test_2line_2tok_markup_iob (line 42) | def test_2line_2tok_markup_iob(self): method test_all_multiline_iob (line 64) | def test_all_multiline_iob(self): FILE: stanza/tests/ner/test_combine_ner_datasets.py function test_combine (line 12) | def test_combine(tmp_path): FILE: stanza/tests/ner/test_convert_amt.py function fake_label (line 19) | def fake_label(label, start_char, end_char): function fake_labels (line 36) | def fake_labels(*indices): function fake_docs (line 39) | def fake_docs(*indices): function test_remove_nesting (line 42) | def test_remove_nesting(): function test_process_doc (line 77) | def test_process_doc(): FILE: stanza/tests/ner/test_convert_nkjp.py function dataset (line 28) | def dataset(tmp_path_factory): function test_extract_entities_from_subfolder (line 46) | def test_extract_entities_from_subfolder(dataset): function test_extract_unassigned (line 56) | def test_extract_unassigned(dataset): function test_extract_entities_from_sentence (line 86) | def test_extract_entities_from_sentence(): FILE: stanza/tests/ner/test_convert_starlang_ner.py function test_read_tree (line 16) | def test_read_tree(): FILE: stanza/tests/ner/test_data.py function pretrain_file (line 56) | def pretrain_file(): function one_sentence_json_path (line 61) | def one_sentence_json_path(tmpdir_factory): function test_build_vocab (line 68) | def test_build_vocab(pretrain_file, one_sentence_json_path, tmp_path): function test_build_vocab_ignore_repeats (line 89) | def test_build_vocab_ignore_repeats(pretrain_file, one_sentence_json_pat... FILE: stanza/tests/ner/test_from_conllu.py function test_from_conllu (line 9) | def test_from_conllu(): FILE: stanza/tests/ner/test_models_ner_scorer.py function test_ner_scorer (line 13) | def test_ner_scorer(): FILE: stanza/tests/ner/test_ner_tagger.py function test_ner (line 59) | def test_ner(): function test_evaluate (line 64) | def test_evaluate(tmp_path): FILE: stanza/tests/ner/test_ner_trainer.py function test_fix_singleton_tags (line 9) | def test_fix_singleton_tags(): FILE: stanza/tests/ner/test_ner_training.py function pretrain_file (line 90) | def pretrain_file(): function write_temp_file (line 93) | def write_temp_file(filename, bio_data): function write_temp_2tag (line 99) | def write_temp_2tag(filename, bio_data): function get_args (line 114) | def get_args(tmp_path, pretrain_file, train_json, dev_json, *extra_args): function run_two_tag_training (line 128) | def run_two_tag_training(pretrain_file, tmp_path, *extra_args, train_dat... function test_basic_two_tag_training (line 138) | def test_basic_two_tag_training(pretrain_file, tmp_path): function test_two_tag_training_backprop (line 144) | def test_two_tag_training_backprop(pretrain_file, tmp_path): function test_two_tag_training_c2_backprop (line 163) | def test_two_tag_training_c2_backprop(pretrain_file, tmp_path): function test_connected_two_tag_training (line 182) | def test_connected_two_tag_training(pretrain_file, tmp_path): function run_training (line 193) | def run_training(pretrain_file, tmp_path, *extra_args): function test_train_model_gpu (line 204) | def test_train_model_gpu(pretrain_file, tmp_path): function test_train_model_cpu (line 218) | def test_train_model_cpu(pretrain_file, tmp_path): function model_file_has_bert (line 228) | def model_file_has_bert(filename): function test_with_bert (line 232) | def test_with_bert(pretrain_file, tmp_path): function test_with_bert_finetune (line 237) | def test_with_bert_finetune(pretrain_file, tmp_path): function test_with_peft_finetune (line 252) | def test_with_peft_finetune(pretrain_file, tmp_path): FILE: stanza/tests/ner/test_ner_utils.py function test_normalize_empty_tags (line 23) | def test_normalize_empty_tags(): function check_reprocessed_tags (line 29) | def check_reprocessed_tags(words, input_tags, expected_tags): function test_process_tags_bio (line 37) | def test_process_tags_bio(): function test_process_tags_with_none (line 43) | def test_process_tags_with_none(): function merge_tags (line 47) | def merge_tags(*tags): function test_combined_tags_bio (line 52) | def test_combined_tags_bio(): function test_combined_tags_mixed (line 57) | def test_combined_tags_mixed(): function test_process_tags_basic (line 62) | def test_process_tags_basic(): function test_process_tags_bioes (line 65) | def test_process_tags_bioes(): function run_flattened (line 72) | def run_flattened(fn, tags): function test_check_bio (line 75) | def test_check_bio(): function test_check_basic (line 81) | def test_check_basic(): function test_underscores (line 87) | def test_underscores(): function test_merge_tags (line 94) | def test_merge_tags(): FILE: stanza/tests/ner/test_pay_amt_annotators.py function completed_amt_job_metadata (line 16) | def completed_amt_job_metadata(tmp_path_factory): function test_amt_annotator_track (line 24) | def test_amt_annotator_track(completed_amt_job_metadata): function test_amt_annotator_track_no_map (line 37) | def test_amt_annotator_track_no_map(completed_amt_job_metadata): function main (line 43) | def main(): FILE: stanza/tests/ner/test_split_wikiner.py function test_read_sentences (line 124) | def test_read_sentences(): function test_write_sentences (line 137) | def test_write_sentences(): function run_split_wikiner (line 150) | def run_split_wikiner(expected_train=14, expected_dev=3, expected_test=3... function test_no_shuffle_split (line 191) | def test_no_shuffle_split(): function test_shuffle_split (line 194) | def test_shuffle_split(): function test_resize (line 197) | def test_resize(): function test_no_test_split (line 200) | def test_no_test_split(): FILE: stanza/tests/ner/test_suc3.py function test_read_zip (line 56) | def test_read_zip(): function test_read_raw (line 75) | def test_read_raw(): FILE: stanza/tests/pipeline/pipeline_device_tests.py function check_on_gpu (line 11) | def check_on_gpu(pipeline): function check_on_cpu (line 31) | def check_on_cpu(pipeline): FILE: stanza/tests/pipeline/test_arabic_pipeline.py function test_arabic_pos_pipeline (line 16) | def test_arabic_pos_pipeline(): FILE: stanza/tests/pipeline/test_core.py function test_pretagged (line 14) | def test_pretagged(): function test_download_missing_ner_model (line 26) | def test_download_missing_ner_model(): function test_download_missing_resources (line 41) | def test_download_missing_resources(): function test_download_resources_overwrites (line 55) | def test_download_resources_overwrites(): function test_reuse_resources_overwrites (line 70) | def test_reuse_resources_overwrites(): function test_download_not_repeated (line 94) | def test_download_not_repeated(): function test_download_none (line 111) | def test_download_none(): function check_download_method_updates (line 141) | def check_download_method_updates(download_method): function test_download_fixed (line 161) | def test_download_fixed(): function test_download_strings (line 168) | def test_download_strings(): function test_limited_pipeline (line 175) | def test_limited_pipeline(): function unknown_language_name (line 201) | def unknown_language_name(): function test_empty_unknown_language (line 209) | def test_empty_unknown_language(unknown_language_name): function test_unknown_language_tokenizer (line 216) | def test_unknown_language_tokenizer(unknown_language_name): function test_unknown_language_mwt (line 234) | def test_unknown_language_mwt(unknown_language_name): FILE: stanza/tests/pipeline/test_decorators.py class LowercaseProcessor (line 52) | class LowercaseProcessor(Processor): method __init__ (line 57) | def __init__(self, config, pipeline, device): method _set_up_model (line 60) | def _set_up_model(self, *args): method process (line 63) | def process(self, doc): function test_register_processor (line 74) | def test_register_processor(): function test_register_nonprocessor (line 79) | def test_register_nonprocessor(): class LOLTokenizer (line 86) | class LOLTokenizer(ProcessorVariant): method __init__ (line 89) | def __init__(self, lang): method process (line 92) | def process(self, text): function test_register_processor_variant (line 96) | def test_register_processor_variant(): class CoolLemmatizer (line 102) | class CoolLemmatizer(ProcessorVariant): method __init__ (line 107) | def __init__(self, lang): method process (line 110) | def process(self, document): function test_register_processor_variant_with_override (line 117) | def test_register_processor_variant_with_override(): function test_register_nonprocessor_variant (line 123) | def test_register_nonprocessor_variant(): FILE: stanza/tests/pipeline/test_depparse.py function en_depparse_pipeline (line 67) | def en_depparse_pipeline(): function test_depparse (line 72) | def test_depparse(en_depparse_pipeline): function test_depparse_with_pretagged_doc (line 77) | def test_depparse_with_pretagged_doc(): function test_raises_requirements_exception_if_pretagged_not_passed (line 88) | def test_raises_requirements_exception_if_pretagged_not_passed(): FILE: stanza/tests/pipeline/test_english_pipeline.py class TestEnglishPipeline (line 187) | class TestEnglishPipeline: method pipeline (line 189) | def pipeline(self): method pretokenized_pipeline (line 193) | def pretokenized_pipeline(self): method tokenizer_pipeline (line 197) | def tokenizer_pipeline(self): method processed_doc (line 201) | def processed_doc(self, pipeline): method test_text (line 205) | def test_text(self, processed_doc): method test_conllu (line 209) | def test_conllu(self, processed_doc): method test_process_conllu (line 212) | def test_process_conllu(self, pipeline): method test_tokens (line 223) | def test_tokens(self, processed_doc): method test_words (line 227) | def test_words(self, processed_doc): method test_dependency_parse (line 231) | def test_dependency_parse(self, processed_doc): method test_empty (line 235) | def test_empty(self, pipeline): method test_bulk_process (line 240) | def test_bulk_process(self, pipeline): method test_empty_bulk_process (line 251) | def test_empty_bulk_process(self, pipeline): method test_pretokenized (line 256) | def test_pretokenized(self, pretokenized_pipeline, tokenizer_pipeline): method test_bulk_pretokenized (line 270) | def test_bulk_pretokenized(self, pretokenized_pipeline, tokenizer_pipe... method test_conll2doc_pretokenized (line 281) | def test_conll2doc_pretokenized(self, pretokenized_pipeline): method test_stream (line 295) | def test_stream(self, pipeline): method processed_multidoc (line 312) | def processed_multidoc(self, pipeline): method test_conllu_multidoc (line 317) | def test_conllu_multidoc(self, processed_multidoc): method test_tokens_multidoc (line 320) | def test_tokens_multidoc(self, processed_multidoc): method test_words_multidoc (line 324) | def test_words_multidoc(self, processed_multidoc): method test_sentence_indices_multidoc (line 327) | def test_sentence_indices_multidoc(self, processed_multidoc): method test_dependency_parse_multidoc (line 332) | def test_dependency_parse_multidoc(self, processed_multidoc): method processed_multidoc_variant (line 338) | def processed_multidoc_variant(self): method test_dependency_parse_multidoc_variant (line 344) | def test_dependency_parse_multidoc_variant(self, processed_multidoc_va... method test_constituency_parser (line 348) | def test_constituency_parser(self): method test_on_gpu (line 353) | def test_on_gpu(self, pipeline): method test_on_cpu (line 359) | def test_on_cpu(self): FILE: stanza/tests/pipeline/test_french_pipeline.py class TestFrenchPipeline (line 317) | class TestFrenchPipeline: method pipeline (line 319) | def pipeline(self): method test_single (line 324) | def test_single(self, pipeline): method test_bulk (line 328) | def test_bulk(self, pipeline): method test_on_gpu (line 342) | def test_on_gpu(self, pipeline): method test_on_cpu (line 348) | def test_on_cpu(self): FILE: stanza/tests/pipeline/test_lemmatizer.py function test_identity_lemmatizer (line 36) | def test_identity_lemmatizer(): function test_full_lemmatizer (line 44) | def test_full_lemmatizer(): function find_unknown_word (line 52) | def find_unknown_word(lemmatizer, base): function test_store_results (line 59) | def test_store_results(): function test_caseless_lemmatizer (line 107) | def test_caseless_lemmatizer(): function test_latin_caseless_lemmatizer (line 122) | def test_latin_caseless_lemmatizer(): function test_contextual_lemmatizer (line 137) | def test_contextual_lemmatizer(): FILE: stanza/tests/pipeline/test_pipeline_constituency_processor.py function foundation_cache (line 16) | def foundation_cache(): function check_results (line 23) | def check_results(doc): function test_sorted_big_batch (line 28) | def test_sorted_big_batch(foundation_cache): function test_comments (line 33) | def test_comments(foundation_cache): function test_illegal_batch_size (line 47) | def test_illegal_batch_size(foundation_cache): function test_sorted_one_batch (line 52) | def test_sorted_one_batch(foundation_cache): function test_sorted_two_batch (line 57) | def test_sorted_two_batch(foundation_cache): function test_get_constituents (line 62) | def test_get_constituents(foundation_cache): FILE: stanza/tests/pipeline/test_pipeline_depparse_processor.py class TestClassifier (line 13) | class TestClassifier: method english_depparse (line 15) | def english_depparse(self): method test_get_known_relations (line 23) | def test_get_known_relations(self, english_depparse): FILE: stanza/tests/pipeline/test_pipeline_mwt_expander.py function test_mwt (line 74) | def test_mwt(): function test_unknown_character (line 86) | def test_unknown_character(): function test_unknown_word (line 104) | def test_unknown_word(): FILE: stanza/tests/pipeline/test_pipeline_ner_processor.py function check_entities_equal (line 44) | def check_entities_equal(doc, expected): class TestNERProcessor (line 53) | class TestNERProcessor: method pipeline (line 55) | def pipeline(self): method processed_doc (line 62) | def processed_doc(self, pipeline): method processed_bulk (line 68) | def processed_bulk(self, pipeline): method test_bulk_ents (line 73) | def test_bulk_ents(self, processed_bulk): method test_ents (line 78) | def test_ents(self, processed_doc): class TestMultiNERProcessor (line 125) | class TestMultiNERProcessor: method pipeline (line 127) | def pipeline(self): method test_multi_example (line 133) | def test_multi_example(self, pipeline): method test_multi_ner (line 137) | def test_multi_ner(self, pipeline): method test_known_tags (line 145) | def test_known_tags(self, pipeline): FILE: stanza/tests/pipeline/test_pipeline_pos_processor.py function pos_pipeline (line 25) | def pos_pipeline(): function test_part_of_speech (line 28) | def test_part_of_speech(pos_pipeline): function test_get_known_xpos (line 32) | def test_get_known_xpos(pos_pipeline): function test_get_known_upos (line 39) | def test_get_known_upos(pos_pipeline): function test_get_known_feats (line 47) | def test_get_known_feats(pos_pipeline): FILE: stanza/tests/pipeline/test_pipeline_sentiment_processor.py class TestSentimentPipeline (line 19) | class TestSentimentPipeline: method pipeline (line 21) | def pipeline(self): method test_simple (line 28) | def test_simple(self, pipeline): method test_multiple_sentences (line 36) | def test_multiple_sentences(self, pipeline): method test_empty_text (line 42) | def test_empty_text(self, pipeline): FILE: stanza/tests/pipeline/test_requirements.py function check_exception_vals (line 14) | def check_exception_vals(req_exception, req_exception_vals): function test_missing_requirements (line 27) | def test_missing_requirements(): FILE: stanza/tests/pipeline/test_tokenizer.py function basic_pipeline (line 314) | def basic_pipeline(): function pretokenized_pipeline (line 321) | def pretokenized_pipeline(): function zh_pipeline (line 327) | def zh_pipeline(): function test_tokenize (line 332) | def test_tokenize(basic_pipeline): function test_tokenize_ssplit_robustness (line 337) | def test_tokenize_ssplit_robustness(basic_pipeline): function test_pretokenized (line 342) | def test_pretokenized(pretokenized_pipeline): function test_pretokenized_multidoc (line 350) | def test_pretokenized_multidoc(pretokenized_pipeline): function test_postprocessor (line 358) | def test_postprocessor(): function test_postprocessor_mwt (line 374) | def test_postprocessor_mwt(): function test_postprocessor_typeerror (line 391) | def test_postprocessor_typeerror(): function test_no_ssplit (line 397) | def test_no_ssplit(): function test_zh_tokenizer_skip_newline (line 406) | def test_zh_tokenizer_skip_newline(zh_pipeline): function test_zh_tokenizer_skip_newline_offsets (line 412) | def test_zh_tokenizer_skip_newline_offsets(zh_pipeline): function test_zh_tokenizer_parens (line 418) | def test_zh_tokenizer_parens(zh_pipeline): function test_spacy (line 427) | def test_spacy(): function test_spacy_no_ssplit (line 436) | def test_spacy_no_ssplit(): function test_sudachipy (line 445) | def test_sudachipy(): function test_sudachipy_no_ssplit (line 453) | def test_sudachipy_no_ssplit(): function test_jieba (line 461) | def test_jieba(): function test_jieba_no_ssplit (line 469) | def test_jieba_no_ssplit(): function test_pythainlp (line 477) | def test_pythainlp(): function test_pythainlp_no_ssplit (line 484) | def test_pythainlp_no_ssplit(): FILE: stanza/tests/pos/test_data.py function test_basic_reading (line 15) | def test_basic_reading(): function test_no_xpos (line 29) | def test_no_xpos(): function test_no_upos (line 43) | def test_no_upos(): function test_no_feats (line 57) | def test_no_feats(): function test_no_augment (line 71) | def test_no_augment(): function test_augment (line 86) | def test_augment(): function test_sometimes_augment (line 101) | def test_sometimes_augment(): function test_shuffle (line 144) | def test_shuffle(tmp_path): function test_length_limited_dataloader (line 263) | def test_length_limited_dataloader(): function test_punct_simplification (line 323) | def test_punct_simplification(): FILE: stanza/tests/pos/test_tagger.py class TestTagger (line 126) | class TestTagger: method wordvec_pretrain_file (line 128) | def wordvec_pretrain_file(self): method charlm_args (line 132) | def charlm_args(self): method run_training (line 137) | def run_training(self, tmp_path, wordvec_pretrain_file, train_text, de... method test_train (line 182) | def test_train(self, tmp_path, wordvec_pretrain_file, augment_nopunct=... method test_vocab_cutoff (line 188) | def test_vocab_cutoff(self, tmp_path, wordvec_pretrain_file): method test_multiple_files (line 198) | def test_multiple_files(self, tmp_path, wordvec_pretrain_file): method test_train_zero_augment (line 214) | def test_train_zero_augment(self, tmp_path, wordvec_pretrain_file): method test_train_100_augment (line 223) | def test_train_100_augment(self, tmp_path, wordvec_pretrain_file): method test_train_charlm (line 232) | def test_train_charlm(self, tmp_path, wordvec_pretrain_file, charlm_ar... method test_train_charlm_projection (line 235) | def test_train_charlm_projection(self, tmp_path, wordvec_pretrain_file... method test_missing_column (line 239) | def test_missing_column(self, tmp_path, wordvec_pretrain_file): method test_save_each (line 275) | def test_save_each(self, tmp_path, wordvec_pretrain_file): method test_with_bert (line 285) | def test_with_bert(self, tmp_path, wordvec_pretrain_file): method test_with_bert_nlayers (line 288) | def test_with_bert_nlayers(self, tmp_path, wordvec_pretrain_file): method test_with_bert_finetune (line 291) | def test_with_bert_finetune(self, tmp_path, wordvec_pretrain_file): method test_bert_pipeline (line 294) | def test_bert_pipeline(self, tmp_path, wordvec_pretrain_file): FILE: stanza/tests/pos/test_xpos_vocab_factory.py function build_doc (line 37) | def build_doc(iterations, suffix): function build_data (line 50) | def build_data(iterations, suffix): class ErrorFatalHandler (line 58) | class ErrorFatalHandler(logging.Handler): method __init__ (line 64) | def __init__(self): method emit (line 69) | def emit(self, record): class TestXPOSVocabFactory (line 72) | class TestXPOSVocabFactory: method setup_class (line 74) | def setup_class(cls): method teardown_class (line 90) | def teardown_class(cls): method test_basic_en_ewt (line 99) | def test_basic_en_ewt(self): method test_basic_en_unknown (line 110) | def test_basic_en_unknown(self): method test_dash_en_unknown (line 119) | def test_dash_en_unknown(self): method test_dash_en_ewt_wrong (line 128) | def test_dash_en_ewt_wrong(self): method check_reload (line 138) | def check_reload(self, pt, shorthand, iterations, suffix, expected_voc... method pt (line 162) | def pt(self): method test_reload_word_vocab (line 166) | def test_reload_word_vocab(self, pt): method test_reload_unknown_word_vocab (line 172) | def test_reload_unknown_word_vocab(self, pt): method test_reload_unknown_xpos_vocab (line 178) | def test_reload_unknown_xpos_vocab(self, pt): FILE: stanza/tests/resources/test_charlm_depparse.py function test_list_depparse (line 6) | def test_list_depparse(): FILE: stanza/tests/resources/test_common.py function test_assert_file_exists (line 15) | def test_assert_file_exists(): function test_download_tokenize_mwt (line 37) | def test_download_tokenize_mwt(): function test_download_non_default (line 45) | def test_download_non_default(): function test_download_two_models (line 63) | def test_download_two_models(): function test_process_pipeline_parameters (line 87) | def test_process_pipeline_parameters(): function test_language_resources (line 108) | def test_language_resources(): FILE: stanza/tests/resources/test_default_packages.py function test_default_pretrains (line 7) | def test_default_pretrains(): function test_no_pretrain_languages (line 14) | def test_no_pretrain_languages(): FILE: stanza/tests/resources/test_installation.py function test_install_corenlp (line 15) | def test_install_corenlp(): function test_download_corenlp_models (line 32) | def test_download_corenlp_models(): function test_download_tokenize_mwt (line 42) | def test_download_tokenize_mwt(): FILE: stanza/tests/resources/test_prepare_resources.py function test_split_model_name (line 10) | def test_split_model_name(): FILE: stanza/tests/server/test_client.py function run_webserver (line 44) | def run_webserver(port, timeout_secs): class HTTPMockServerTimeoutContext (line 55) | class HTTPMockServerTimeoutContext: method __init__ (line 57) | def __init__(self, port, timeout_secs): method __enter__ (line 61) | def __enter__(self): method __exit__ (line 66) | def __exit__(self, exc_type, exc_value, exc_traceback): class TestCoreNLPClient (line 69) | class TestCoreNLPClient: method corenlp_client (line 71) | def corenlp_client(self): method test_connect (line 79) | def test_connect(self, corenlp_client): method test_context_manager (line 85) | def test_context_manager(self): method test_no_duplicate_servers (line 91) | def test_no_duplicate_servers(self): method test_annotate (line 97) | def test_annotate(self, corenlp_client): method test_update (line 102) | def test_update(self, corenlp_client): method test_tokensregex (line 108) | def test_tokensregex(self, corenlp_client): method test_semgrex (line 128) | def test_semgrex(self, corenlp_client): method test_tregex (line 148) | def test_tregex(self, corenlp_client): method test_tregex_trees (line 161) | def test_tregex_trees(self, corenlp_client): method external_server_9001 (line 176) | def external_server_9001(self): method test_external_server_legacy_start_server (line 189) | def test_external_server_legacy_start_server(self, external_server_9001): method test_external_server_available (line 195) | def test_external_server_available(self, external_server_9001): method test_external_server_unavailable (line 202) | def test_external_server_unavailable(self): method test_external_server_timeout (line 208) | def test_external_server_timeout(self): method test_external_server_try_start_with_external (line 216) | def test_external_server_try_start_with_external(self, external_server... method test_external_server_try_start (line 226) | def test_external_server_try_start(self): method test_external_server_force_start (line 234) | def test_external_server_force_start(self, external_server_9001): FILE: stanza/tests/server/test_java_protobuf_requests.py function check_tree (line 14) | def check_tree(proto_tree, py_tree, py_score): function test_build_tree (line 19) | def test_build_tree(): function test_convert_networkx_graph (line 43) | def test_convert_networkx_graph(): function test_nbsp_doc (line 81) | def test_nbsp_doc(): FILE: stanza/tests/server/test_morphology.py function test_process_text (line 13) | def test_process_text(): function test_basic_morphology (line 19) | def test_basic_morphology(): FILE: stanza/tests/server/test_parser_eval.py function build_one_tree_treebank (line 16) | def build_one_tree_treebank(fake_scores=True): function check_build (line 29) | def check_build(fake_scores=True): function test_build_tuple_request (line 42) | def test_build_tuple_request(): function test_build_notuple_request (line 45) | def test_build_notuple_request(): function test_score_one_tree_tuples (line 48) | def test_score_one_tree_tuples(): function test_score_one_tree_notuples (line 55) | def test_score_one_tree_notuples(): FILE: stanza/tests/server/test_protobuf.py function doc_pb (line 26) | def doc_pb(): function test_parse_protobuf (line 37) | def test_parse_protobuf(doc_pb): function test_write_protobuf (line 41) | def test_write_protobuf(doc_pb): function test_document_text (line 51) | def test_document_text(doc_pb): function test_sentences (line 55) | def test_sentences(doc_pb): function test_tokens (line 67) | def test_tokens(doc_pb): function test_dependency_parse (line 102) | def test_dependency_parse(doc_pb): function test_coref_chain (line 133) | def test_coref_chain(doc_pb): FILE: stanza/tests/server/test_semgrex.py function check_response (line 154) | def check_response(response, response_len=1, semgrex_len=1, source_index... function test_multi (line 174) | def test_multi(): function test_single_sentence (line 183) | def test_single_sentence(): function test_two_semgrex (line 187) | def test_two_semgrex(): function test_two_sentences (line 191) | def test_two_sentences(): function test_word_attribute (line 195) | def test_word_attribute(): function test_lemma_attribute (line 199) | def test_lemma_attribute(): function test_xpos_attribute (line 203) | def test_xpos_attribute(): function test_upos_attribute (line 209) | def test_upos_attribute(): function test_ner_attribute (line 213) | def test_ner_attribute(): function test_hand_built_request (line 217) | def test_hand_built_request(): function test_blank_dependency (line 267) | def test_blank_dependency(): function test_ner_annotated (line 300) | def test_ner_annotated(): function test_not_annotated (line 319) | def test_not_annotated(): function test_empty_not_annotated (line 329) | def test_empty_not_annotated(): function test_only_not_annotated (line 341) | def test_only_not_annotated(): FILE: stanza/tests/server/test_server_misc.py function test_english_request (line 56) | def test_english_request(): function test_default_annotators (line 69) | def test_default_annotators(): function test_codepoints (line 86) | def test_codepoints(): function test_codepoint_text (line 98) | def test_codepoint_text(): FILE: stanza/tests/server/test_server_pretokenized.py function pretokenized_test (line 52) | def pretokenized_test(lang): function test_english_pretokenized (line 67) | def test_english_pretokenized(): function test_italian_pretokenized (line 71) | def test_italian_pretokenized(): function test_french_pretokenized (line 75) | def test_french_pretokenized(): FILE: stanza/tests/server/test_server_request.py class TestServerRequest (line 188) | class TestServerRequest: method corenlp_client (line 190) | def corenlp_client(self): method test_basic (line 197) | def test_basic(self, corenlp_client): method test_python_dict (line 205) | def test_python_dict(self, corenlp_client): method test_lang_setting (line 213) | def test_lang_setting(self, corenlp_client): method test_annotators_and_output_format (line 219) | def test_annotators_and_output_format(self, corenlp_client): FILE: stanza/tests/server/test_server_start.py function annotate_and_time (line 152) | def annotate_and_time(client, text, properties={}): function test_preload (line 159) | def test_preload(): function test_props_file (line 169) | def test_props_file(): function test_lang_start (line 176) | def test_lang_start(): function test_python_dict (line 183) | def test_python_dict(): function test_python_dict_w_annotators (line 190) | def test_python_dict_w_annotators(): function test_username_password (line 198) | def test_username_password(): FILE: stanza/tests/server/test_ssurgeon.py function test_ssurgeon_same_length (line 37) | def test_ssurgeon_same_length(): function test_ssurgeon_different_length (line 76) | def test_ssurgeon_different_length(): function test_ssurgeon_become_mwt (line 116) | def test_ssurgeon_become_mwt(): function test_ssurgeon_existing_mwt_no_change (line 157) | def test_ssurgeon_existing_mwt_no_change(): function check_empty_test (line 181) | def check_empty_test(input_text, expected=None, echo=False): function test_ssurgeon_mwt_text (line 215) | def test_ssurgeon_mwt_text(): function test_ssurgeon_spaces_after_text (line 258) | def test_ssurgeon_spaces_after_text(): function test_ssurgeon_spaces_after_yes (line 266) | def test_ssurgeon_spaces_after_yes(): function test_ssurgeon_blank_values (line 283) | def test_ssurgeon_blank_values(): function test_ssurgeon_misc_words (line 321) | def test_ssurgeon_misc_words(): function test_ssurgeon_mwt_space_after (line 343) | def test_ssurgeon_mwt_space_after(): function test_ssurgeon_mwt_misc (line 367) | def test_ssurgeon_mwt_misc(): function test_ssurgeon_rewrite_sindhi_roots (line 407) | def test_ssurgeon_rewrite_sindhi_roots(): FILE: stanza/tests/server/test_tokensregex.py function test_single_sentence (line 11) | def test_single_sentence(): function test_ner_sentence (line 31) | def test_ner_sentence(): FILE: stanza/tests/server/test_tsurgeon.py function test_simple (line 16) | def test_simple(): function test_context (line 26) | def test_context(): function test_arboretum (line 45) | def test_arboretum(): FILE: stanza/tests/server/test_ud_enhancer.py function check_edges (line 10) | def check_edges(graph, source, target, num, isExtra=None): function test_one_sentence (line 16) | def test_one_sentence(): FILE: stanza/tests/tokenization/test_prepare_tokenizer_treebank.py function test_has_space_after_no (line 9) | def test_has_space_after_no(): function test_add_space_after_no (line 18) | def test_add_space_after_no(): function test_remove_space_after_no (line 24) | def test_remove_space_after_no(): function read_test_doc (line 31) | def read_test_doc(doc): function test_augment_initial_punct (line 215) | def test_augment_initial_punct(): function test_augment_initial_punct_error (line 233) | def test_augment_initial_punct_error(): function test_augment_space_final_punct (line 302) | def test_augment_space_final_punct(): function test_augment_space_final_punct (line 364) | def test_augment_space_final_punct(): function test_augment_comma_separations (line 388) | def test_augment_comma_separations(): FILE: stanza/tests/tokenization/test_replace_long_tokens.py function test_replace_long_tokens (line 13) | def test_replace_long_tokens(): function test_set_max_len (line 22) | def test_set_max_len(): FILE: stanza/tests/tokenization/test_spaces.py function test_spaces_no_mwt (line 28) | def test_spaces_no_mwt(): function test_spaces_mwt (line 67) | def test_spaces_mwt(): FILE: stanza/tests/tokenization/test_tokenization_lst20.py function check_results (line 120) | def check_results(documents, expected_conllu, expected_txt, expected_lab... function test_small (line 136) | def test_small(): function test_space_after (line 180) | def test_space_after(): function test_split_clause (line 224) | def test_split_clause(): FILE: stanza/tests/tokenization/test_tokenization_orchid.py function check_results (line 88) | def check_results(documents, expected_conllu, expected_txt, expected_lab... function test_orchid (line 103) | def test_orchid(): FILE: stanza/tests/tokenization/test_tokenize_data.py function write_tokenizer_input (line 20) | def write_tokenizer_input(test_dir, raw_text, labels): function test_has_mwt (line 52) | def test_has_mwt(): function tokenizer (line 66) | def tokenizer(): function zhtok (line 72) | def zhtok(): function test_convert_units_raw_text (line 82) | def test_convert_units_raw_text(tokenizer): function check_labels (line 111) | def check_labels(labels, expected_labels): function test_convert_units_file (line 116) | def test_convert_units_file(tokenizer): function test_dictionary (line 150) | def test_dictionary(zhtok): function test_dictionary_feats (line 172) | def test_dictionary_feats(zhtok): function test_numeric_re (line 198) | def test_numeric_re(): FILE: stanza/tests/tokenization/test_tokenize_files.py function test_tokenize_files (line 13) | def test_tokenize_files(tmp_path): FILE: stanza/tests/tokenization/test_tokenize_utils.py function test_find_spans (line 18) | def test_find_spans(): function check_offsets (line 37) | def check_offsets(doc, expected_offsets): function test_match_tokens_with_text (line 48) | def test_match_tokens_with_text(): function test_long_paragraph (line 70) | def test_long_paragraph(): function test_postprocessor_application (line 97) | def test_postprocessor_application(): function test_reassembly_indexing (line 114) | def test_reassembly_indexing(): function test_reassembly_reference_failures (line 131) | def test_reassembly_reference_failures(): function test_lexicon_from_training_data (line 203) | def test_lexicon_from_training_data(tmp_path): FILE: stanza/tests/tokenization/test_vocab.py function test_build (line 8) | def test_build(): function test_append (line 20) | def test_append(): FILE: stanza/utils/avg_sent_len.py function avg_sent_len (line 4) | def avg_sent_len(toklabels): FILE: stanza/utils/charlm/conll17_to_text.py function process_file (line 23) | def process_file(input_filename, output_directory, compress): function parse_args (line 73) | def parse_args(): FILE: stanza/utils/charlm/dump_oscar.py function parse_args (line 25) | def parse_args(): function download_2023 (line 43) | def download_2023(args): function main (line 48) | def main(): FILE: stanza/utils/charlm/make_lm_data.py function main (line 32) | def main(): function prepare_lm_data (line 93) | def prepare_lm_data(src_dir, tgt_dir, lang, dataset_name, compress, spli... FILE: stanza/utils/charlm/oscar_to_text.py function extract_file (line 21) | def extract_file(output_directory, input_filename, use_xz): function parse_args (line 50) | def parse_args(): function main (line 58) | def main(): FILE: stanza/utils/confusion.py function condense_ner_labels (line 6) | def condense_ner_labels(confusion, gold_labels, pred_labels): function format_confusion (line 30) | def format_confusion(confusion, labels=None, hide_zeroes=False, hide_bla... function confusion_to_accuracy (line 143) | def confusion_to_accuracy(confusion_matrix): function confusion_to_f1 (line 157) | def confusion_to_f1(confusion_matrix): function confusion_to_macro_f1 (line 194) | def confusion_to_macro_f1(confusion_matrix): function confusion_to_weighted_f1 (line 205) | def confusion_to_weighted_f1(confusion_matrix, exclude=None): FILE: stanza/utils/conll.py class CoNLLError (line 13) | class CoNLLError(ValueError): class CoNLL (line 16) | class CoNLL: method load_conll (line 19) | def load_conll(f, ignore_gapping=True, keep_line_numbers=False): method convert_conll (line 59) | def convert_conll(doc_conll): method convert_dict (line 88) | def convert_dict(doc_dict): method convert_conll_token (line 105) | def convert_conll_token(token_conll): method conll2dict (line 127) | def conll2dict(input_file=None, input_str=None, ignore_gapping=True, z... method conll2doc (line 148) | def conll2doc(input_file=None, input_str=None, ignore_gapping=True, zi... method conll2multi_docs (line 153) | def conll2multi_docs(input_file=None, input_str=None, ignore_gapping=T... method dict2conll (line 195) | def dict2conll(doc_dict, filename): method write_doc2conll (line 204) | def write_doc2conll(doc, filename, mode='w', encoding='utf-8'): FILE: stanza/utils/constituency/check_transitions.py function main (line 9) | def main(): FILE: stanza/utils/datasets/common.py class ModelType (line 28) | class ModelType(Enum): class UnknownDatasetError (line 35) | class UnknownDatasetError(ValueError): method __init__ (line 36) | def __init__(self, dataset, text): function convert_conllu_to_txt (line 40) | def convert_conllu_to_txt(tokenizer_dir, short_name, shards=("train", "d... function strip_accents (line 55) | def strip_accents(word): function mwt_name (line 65) | def mwt_name(base_dir, short_name, dataset): function tokenizer_conllu_name (line 68) | def tokenizer_conllu_name(base_dir, short_name, dataset): function prepare_tokenizer_dataset_labels (line 71) | def prepare_tokenizer_dataset_labels(input_txt, input_conllu, tokenizer_... function prepare_tokenizer_treebank_labels (line 79) | def prepare_tokenizer_treebank_labels(tokenizer_dir, short_name): function read_sentences_from_conllu (line 94) | def read_sentences_from_conllu(filename): function maybe_add_fake_dependencies (line 115) | def maybe_add_fake_dependencies(lines): function write_sentences_to_file (line 167) | def write_sentences_to_file(outfile, sents): function write_sentences_to_conllu (line 174) | def write_sentences_to_conllu(filename, sents): function find_treebank_dataset_file (line 178) | def find_treebank_dataset_file(treebank, udbase_dir, dataset, extension,... function mostly_underscores (line 204) | def mostly_underscores(filename): function num_words_in_file (line 229) | def num_words_in_file(conllu_file): function get_test_only_ud_treebanks (line 245) | def get_test_only_ud_treebanks(udbase_dir, filtered=True): function get_ud_treebanks (line 278) | def get_ud_treebanks(udbase_dir, lang=None, filtered=True): function build_argparse (line 307) | def build_argparse(): function main (line 314) | def main(process_treebank, model_type, add_specific_args=None): FILE: stanza/utils/datasets/conllu_to_text.py function print_new_paragraph_if_needed (line 15) | def print_new_paragraph_if_needed(fout, start, newdoc, newpar, output_bu... function print_lines_from_buffer (line 24) | def print_lines_from_buffer(fout, output_buffer, max_len): function convert_text (line 42) | def convert_text(conllu_file, output_file): function main (line 129) | def main(args=None): FILE: stanza/utils/datasets/constituency/build_silver_dataset.py function parse_args (line 30) | def parse_args(args=None): function main (line 66) | def main(): FILE: stanza/utils/datasets/constituency/common_trees.py function main (line 9) | def main(): FILE: stanza/utils/datasets/constituency/convert_alt.py function read_split_file (line 13) | def read_split_file(split_file): function split_trees (line 32) | def split_trees(all_lines, splits): function read_alt_lines (line 52) | def read_alt_lines(input_files): function convert_alt (line 82) | def convert_alt(input_files, split_files, output_files): FILE: stanza/utils/datasets/constituency/convert_arboretum.py function read_xml_file (line 104) | def read_xml_file(input_filename): class BrokenLinkError (line 148) | class BrokenLinkError(ValueError): method __init__ (line 149) | def __init__(self, error): function process_nodes (line 152) | def process_nodes(root_id, words, nodes, visited): function check_words (line 176) | def check_words(tree, tsurgeon_processor): function replace_words (line 225) | def replace_words(tree, words): function process_tree (line 234) | def process_tree(sentence): function word_sequence_missing_words (line 309) | def word_sequence_missing_words(tree): function split_underscores (line 339) | def split_underscores(tree): function has_weird_constituents (line 377) | def has_weird_constituents(tree): function convert_tiger_treebank (line 389) | def convert_tiger_treebank(input_filename): function main (line 439) | def main(): FILE: stanza/utils/datasets/constituency/convert_cintil.py function read_xml_file (line 6) | def read_xml_file(input_filename): function convert_cintil_treebank (line 41) | def convert_cintil_treebank(input_filename, train_size=0.8, dev_size=0.1): function main (line 76) | def main(): FILE: stanza/utils/datasets/constituency/convert_ctb.py class Version (line 14) | class Version(Enum): function filenum_to_shard_51 (line 19) | def filenum_to_shard_51(filenum): function filenum_to_shard_51_basic (line 37) | def filenum_to_shard_51_basic(filenum): function filenum_to_shard_90 (line 54) | def filenum_to_shard_90(filenum): function collect_trees_s (line 124) | def collect_trees_s(root): function collect_trees_text (line 132) | def collect_trees_text(root): function convert_ctb (line 147) | def convert_ctb(input_dir, output_dir, dataset_name, version): FILE: stanza/utils/datasets/constituency/convert_it_turin.py function load_without_asterisks (line 42) | def load_without_asterisks(in_file, encoding='utf-8'): function split_mwe (line 154) | def split_mwe(tree, pipeline): function load_trees (line 200) | def load_trees(filename, pipeline): function save_trees (line 263) | def save_trees(out_file, trees): function convert_it_turin (line 270) | def convert_it_turin(input_path, output_path): function main (line 332) | def main(): FILE: stanza/utils/datasets/constituency/convert_it_vit.py function read_constituency_sentences (line 89) | def read_constituency_sentences(fin): function read_constituency_file (line 112) | def read_constituency_file(filename): function raw_tree (line 128) | def raw_tree(text): function extract_ngrams (line 317) | def extract_ngrams(sentence, process_func, ngram_len=4): function build_ngrams (line 325) | def build_ngrams(sentences, process_func, id_func, ngram_len=4): function match_ngrams (line 349) | def match_ngrams(sentence_ngrams, ngram_map, debug=False): function match_sentences (line 383) | def match_sentences(con_tree_map, con_vit_ngrams, dep_sentences, split_n... function get_mwt (line 423) | def get_mwt(*dep_datasets): function update_mwts_and_special_cases (line 453) | def update_mwts_and_special_cases(original_tree, dep_sentence, mwt_map, ... function update_tree (line 559) | def update_tree(original_tree, dep_sentence, con_id, dep_id, mwt_map, ts... function extract_updated_dataset (line 588) | def extract_updated_dataset(con_tree_map, dep_sentence_map, split_ids, m... function read_updated_trees (line 604) | def read_updated_trees(paths, debug_sentence=None): function convert_it_vit (line 678) | def convert_it_vit(paths, dataset_name, debug_sentence=None): function main (line 691) | def main(): FILE: stanza/utils/datasets/constituency/convert_spmrl.py function add_root (line 9) | def add_root(tree): function convert_spmrl (line 18) | def convert_spmrl(input_directory, output_directory, short_name): FILE: stanza/utils/datasets/constituency/convert_starlang.py function read_tree (line 14) | def read_tree(text): function read_files (line 41) | def read_files(filenames, conversion, log): function read_starlang (line 55) | def read_starlang(paths, conversion=read_tree, log=True): function main (line 82) | def main(conversion=read_tree, log=True): FILE: stanza/utils/datasets/constituency/extract_all_silver_dataset.py function parse_args (line 17) | def parse_args(): function main (line 26) | def main(): FILE: stanza/utils/datasets/constituency/extract_silver_dataset.py function parse_args (line 14) | def parse_args(): function main (line 24) | def main(): FILE: stanza/utils/datasets/constituency/prepare_con_dataset.py function process_it_turin (line 234) | def process_it_turin(paths, dataset_name, *args): function process_it_vit (line 243) | def process_it_vit(paths, dataset_name, *args): function process_vlsp09 (line 249) | def process_vlsp09(paths, dataset_name, *args): function process_vlsp21 (line 259) | def process_vlsp21(paths, dataset_name, *args): function process_vlsp22 (line 276) | def process_vlsp22(paths, dataset_name, *args): function process_arboretum (line 362) | def process_arboretum(paths, dataset_name, *args): function process_starlang (line 383) | def process_starlang(paths, dataset_name, *args): function process_ja_alt (line 399) | def process_ja_alt(paths, dataset_name, *args): function process_pt_cintil (line 417) | def process_pt_cintil(paths, dataset_name, *args): function process_id_icon (line 431) | def process_id_icon(paths, dataset_name, *args): function process_ctb_51 (line 447) | def process_ctb_51(paths, dataset_name, *args): function process_ctb_51b (line 456) | def process_ctb_51b(paths, dataset_name, *args): function process_ctb_90 (line 468) | def process_ctb_90(paths, dataset_name, *args): function process_ptb3_revised (line 478) | def process_ptb3_revised(paths, dataset_name, *args): function process_en_mctb (line 514) | def process_en_mctb(paths, dataset_name, *args): function process_spmrl (line 538) | def process_spmrl(paths, dataset_name, *args): function main (line 576) | def main(dataset_name, *args): FILE: stanza/utils/datasets/constituency/reduce_dataset.py function main (line 21) | def main(): FILE: stanza/utils/datasets/constituency/relabel_tags.py function parse_args (line 18) | def parse_args(): function main (line 33) | def main(): FILE: stanza/utils/datasets/constituency/selftrain.py function common_args (line 18) | def common_args(parser): function add_length_args (line 52) | def add_length_args(parser): function build_ssplit_pipe (line 80) | def build_ssplit_pipe(ssplit, lang): function build_tag_pipe (line 86) | def build_tag_pipe(ssplit, lang, foundation_cache=None): function build_parser_pipes (line 92) | def build_parser_pipes(lang, models, package="default", foundation_cache... function split_docs (line 109) | def split_docs(docs, ssplit_pipe, max_len=140, max_word_len=50, chunk_si... function tokenize_docs (line 145) | def tokenize_docs(docs, pipe, min_len, max_len): function find_matching_trees (line 200) | def find_matching_trees(docs, num_sentences, accepted_trees, tag_pipe, p... FILE: stanza/utils/datasets/constituency/selftrain_it.py function parse_args (line 38) | def parse_args(): function get_paccss (line 65) | def get_paccss(input_dir): function get_europarl (line 79) | def get_europarl(input_dir, ssplit_pipe): function main (line 95) | def main(): FILE: stanza/utils/datasets/constituency/selftrain_single_file.py function parse_args (line 22) | def parse_args(): function read_file (line 40) | def read_file(input_file): function main (line 55) | def main(): FILE: stanza/utils/datasets/constituency/selftrain_vi_quad.py function parse_args (line 14) | def parse_args(): function parse_quad (line 35) | def parse_quad(text): function read_quad (line 60) | def read_quad(train_file): function main (line 66) | def main(): FILE: stanza/utils/datasets/constituency/selftrain_wiki.py function parse_args (line 25) | def parse_args(): function list_wikipedia_files (line 47) | def list_wikipedia_files(input_dir): function read_wiki_file (line 70) | def read_wiki_file(filename): function main (line 111) | def main(): FILE: stanza/utils/datasets/constituency/silver_variance.py function parse_args (line 34) | def parse_args(args=None): function main (line 63) | def main(): FILE: stanza/utils/datasets/constituency/split_holdout.py function write_trees (line 16) | def write_trees(base_path, dataset_name, trees): function main (line 23) | def main(): FILE: stanza/utils/datasets/constituency/split_weighted_ensemble.py function main (line 20) | def main(): FILE: stanza/utils/datasets/constituency/tokenize_wiki.py function parse_args (line 28) | def parse_args(): function main (line 73) | def main(): FILE: stanza/utils/datasets/constituency/treebank_to_labeled_brackets.py function main (line 18) | def main(): FILE: stanza/utils/datasets/constituency/utils.py function copy_dev_test (line 12) | def copy_dev_test(base_path, input_dataset, output_dataset): function write_dataset (line 18) | def write_dataset(datasets, output_dir, dataset_name): function split_treebank (line 24) | def split_treebank(treebank, train_size, dev_size): FILE: stanza/utils/datasets/constituency/vtb_convert.py function unify_label (line 71) | def unify_label(tree): function count_paren_parity (line 78) | def count_paren_parity(tree): function is_valid_line (line 93) | def is_valid_line(line): function convert_file (line 114) | def convert_file(orig_file, new_file, fix_errors=True, convert_brackets=... function convert_files (line 213) | def convert_files(file_list, new_dir, verbose=False, fix_errors=True, co... function convert_dir (line 238) | def convert_dir(orig_dir, new_dir): function main (line 244) | def main(): FILE: stanza/utils/datasets/constituency/vtb_split.py function create_shuffle_list (line 15) | def create_shuffle_list(org_dir): function create_paths (line 28) | def create_paths(split_dir, short_name): function get_num_samples (line 47) | def get_num_samples(org_dir, file_names): function split_files (line 70) | def split_files(org_dir, split_dir, short_name=None, train_size=0.7, dev... function main (line 137) | def main(): FILE: stanza/utils/datasets/contract_mwt.py function contract_mwt (line 3) | def contract_mwt(infile, outfile, ignore_gapping=True): FILE: stanza/utils/datasets/coref/convert_hebrew_iahlt.py function search_mention_start (line 40) | def search_mention_start(doc, mention_start): function search_mention_end (line 57) | def search_mention_end(doc, mention_end): function extract_doc (line 66) | def extract_doc(tokenizer, lines): function read_doc (line 135) | def read_doc(tokenizer, filename): function write_json_file (line 141) | def write_json_file(output_filename, dataset): function main (line 145) | def main(args=None): FILE: stanza/utils/datasets/coref/convert_hebrew_mixed.py function main (line 23) | def main(): FILE: stanza/utils/datasets/coref/convert_hindi.py function flatten_spans (line 14) | def flatten_spans(coref_spans): function remove_nulls (line 33) | def remove_nulls(coref_spans, sentences): function arrange_spans_by_sentence (line 66) | def arrange_spans_by_sentence(coref_spans, sentences): function convert_dataset_section (line 82) | def convert_dataset_section(pipe, section, use_cconj_heads): function remove_nulls_dataset_section (line 107) | def remove_nulls_dataset_section(section): function read_json_file (line 119) | def read_json_file(filename): function write_json_file (line 129) | def write_json_file(output_filename, converted_section): function main (line 133) | def main(): FILE: stanza/utils/datasets/coref/convert_ontonotes.py function read_paragraphs (line 49) | def read_paragraphs(section): function convert_dataset_section (line 65) | def convert_dataset_section(pipe, section, override_singleton_chains=None): function extract_chains_from_chunk (line 122) | def extract_chains_from_chunk(chunk): function extract_chains_from_conll (line 170) | def extract_chains_from_conll(gold_coref_conll): function process_dataset (line 222) | def process_dataset(short_name, ontonotes_path, coref_output_path, use_s... function main (line 267) | def main(): FILE: stanza/utils/datasets/coref/convert_tamil.py function write_json_file (line 28) | def write_json_file(output_filename, converted_section): function read_doc (line 32) | def read_doc(filename): function convert_clusters (line 64) | def convert_clusters(filename, corefs): function main (line 108) | def main(): FILE: stanza/utils/datasets/coref/convert_udcoref.py function process_documents (line 25) | def process_documents(docs, augment=False): function process_dataset (line 237) | def process_dataset(short_name, coref_output_path, split_test, train_fil... function get_dataset_by_language (line 296) | def get_dataset_by_language(coref_input_path, langs): function main (line 307) | def main(args=None): FILE: stanza/utils/datasets/coref/convert_udcoref_1.2.py function process_documents (line 24) | def process_documents(docs, augment=False): function process_dataset (line 163) | def process_dataset(short_name, coref_output_path, split_test, train_fil... function get_dataset_by_language (line 218) | def get_dataset_by_language(coref_input_path, langs): function main (line 229) | def main(): FILE: stanza/utils/datasets/coref/utils.py class DynamicDepth (line 4) | class DynamicDepth(): method get_parse_depths (line 8) | def get_parse_depths(self, heads, start, end): method _get_depth_recursive (line 27) | def _get_depth_recursive(self, index): function find_cconj_head (line 41) | def find_cconj_head(heads, upos, start, end): function process_document (line 59) | def process_document(pipe, doc_id, part_id, sentences, coref_spans, sent... FILE: stanza/utils/datasets/corenlp_segmenter_dataset.py function build_argparse (line 21) | def build_argparse(): function write_segmenter_file (line 28) | def write_segmenter_file(output_filename, dataset): function process_treebank (line 40) | def process_treebank(treebank, model_type, paths, output_dir): function main (line 68) | def main(): FILE: stanza/utils/datasets/depparse/check_results.py function main (line 14) | def main(): FILE: stanza/utils/datasets/ner/build_en_combined.py function convert_ontonotes_file (line 22) | def convert_ontonotes_file(filename, short_name): function convert_worldwide_file (line 43) | def convert_worldwide_file(filename, short_name): function convert_conll03_file (line 63) | def convert_conll03_file(filename, short_name): function build_combined_dataset (line 80) | def build_combined_dataset(base_output_path, short_name): function main (line 98) | def main(): FILE: stanza/utils/datasets/ner/check_for_duplicates.py function read_sentences (line 7) | def read_sentences(filename): function check_for_duplicates (line 28) | def check_for_duplicates(output_filenames, fail=False, check_self=False,... FILE: stanza/utils/datasets/ner/combine_ner_datasets.py function main (line 8) | def main(args=None): FILE: stanza/utils/datasets/ner/compare_entities.py function parse_args (line 13) | def parse_args(): function report_known_entities (line 20) | def report_known_entities(train_file, test_file): function main (line 28) | def main(): FILE: stanza/utils/datasets/ner/conll_to_iob.py function process_conll (line 15) | def process_conll(input_file, output_file, zip_file=None, conversion=Non... function main (line 55) | def main(): FILE: stanza/utils/datasets/ner/convert_amt.py function read_json (line 25) | def read_json(input_filename): function remove_ignored_labels (line 82) | def remove_ignored_labels(docs, ignored): function remap_labels (line 93) | def remap_labels(docs, remap): function remove_nesting (line 113) | def remove_nesting(docs): function process_doc (line 146) | def process_doc(source, labels, pipe): function main (line 194) | def main(args): FILE: stanza/utils/datasets/ner/convert_ar_aqmar.py function read_sentences (line 16) | def read_sentences(infile): function normalize_tags (line 41) | def normalize_tags(sents): function convert_shuffle (line 74) | def convert_shuffle(base_input_path, base_output_path, short_name): FILE: stanza/utils/datasets/ner/convert_bn_daffodil.py function redo_time_tags (line 16) | def redo_time_tags(sentences): function strip_words (line 42) | def strip_words(dataset): function filter_blank_words (line 45) | def filter_blank_words(train_file, train_filtered_file): function filter_broken_tags (line 58) | def filter_broken_tags(train_sentences): function filter_bad_words (line 64) | def filter_bad_words(train_sentences): function read_datasets (line 73) | def read_datasets(in_directory): function convert_dataset (line 110) | def convert_dataset(in_directory, out_directory): FILE: stanza/utils/datasets/ner/convert_bsf_to_beios.py function format_token_as_beios (line 17) | def format_token_as_beios(token: str, tag: str) -> list: function format_token_as_iob (line 30) | def format_token_as_iob(token: str, tag: str) -> list: function convert_bsf (line 42) | def convert_bsf(data: str, bsf_markup: str, converter: str = 'beios') ->... function parse_bsf (line 80) | def parse_bsf(bsf_data: str) -> list: function convert_bsf_in_folder (line 101) | def convert_bsf_in_folder(src_dir_path: str, dst_dir_path: str, converte... function read_languk_train_test_split (line 176) | def read_languk_train_test_split(file_path: str, dev_split: float = 0.1)... FILE: stanza/utils/datasets/ner/convert_bsnlp.py function normalize_bg_entity (line 14) | def normalize_bg_entity(text, entity, raw): function fix_bg_typos (line 112) | def fix_bg_typos(text, raw_filename): function get_sentences (line 135) | def get_sentences(language, pipeline, annotated, raw): function write_sentences (line 257) | def write_sentences(output_filename, annotated_sentences): function convert_bsnlp (line 269) | def convert_bsnlp(language, base_input_path, output_filename, split_file... FILE: stanza/utils/datasets/ner/convert_en_conll03.py function convert_dataset_section (line 16) | def convert_dataset_section(section): function process_dataset (line 24) | def process_dataset(short_name, conll_path, ner_output_path): function main (line 34) | def main(): FILE: stanza/utils/datasets/ner/convert_fire_2013.py function normalize (line 18) | def normalize(e1, e2, e3): function read_fileset (line 47) | def read_fileset(filenames): function write_fileset (line 67) | def write_fileset(output_csv_file, sentences): function convert_fire_2013 (line 79) | def convert_fire_2013(input_path, train_csv_file, dev_csv_file, test_csv... FILE: stanza/utils/datasets/ner/convert_he_iahlt.py function output_entities (line 9) | def output_entities(sentence): function extract_single_sentence (line 22) | def extract_single_sentence(sentence): function extract_sentences (line 70) | def extract_sentences(doc): function convert_iahlt (line 82) | def convert_iahlt(udbase, output_dir, short_name): function main (line 100) | def main(): FILE: stanza/utils/datasets/ner/convert_hy_armtdp.py function read_data (line 20) | def read_data(path: str) -> list: function filter_unicode_broken_characters (line 33) | def filter_unicode_broken_characters(text: str) -> str: function get_label (line 40) | def get_label(tok_start_char: int, tok_end_char: int, labels: list) -> l... function format_sentences (line 50) | def format_sentences(paragraphs: list, nlp_hy: Pipeline) -> list: function convert_to_bioes (line 76) | def convert_to_bioes(sentences: list) -> list: function write_sentences_to_file (line 98) | def write_sentences_to_file(sents, filename): function train_test_dev_split (line 105) | def train_test_dev_split(sents, base_output_path, short_name, train_frac... function convert_dataset (line 127) | def convert_dataset(base_input_path, base_output_path, short_name, downl... FILE: stanza/utils/datasets/ner/convert_ijc.py function convert_tag (line 11) | def convert_tag(tag): function read_single_file (line 29) | def read_single_file(input_file, bio_format=True): function read_ijc_files (line 105) | def read_ijc_files(input_files, bio_format=True): function convert_ijc (line 111) | def convert_ijc(input_files, csv_file, bio_format=True): function convert_split_ijc (line 119) | def convert_split_ijc(input_files, train_csv, dev_csv): FILE: stanza/utils/datasets/ner/convert_kk_kazNERD.py function convert_dataset (line 15) | def convert_dataset(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/ner/convert_lst20.py function convert_lst20 (line 12) | def convert_lst20(paths, short_name, include_space_char=True): FILE: stanza/utils/datasets/ner/convert_mr_l3cube.py function convert (line 10) | def convert(input_file): FILE: stanza/utils/datasets/ner/convert_my_ucsy.py function convert_file (line 44) | def convert_file(input_filename, output_filename, pipe): function convert_my_ucsy (line 92) | def convert_my_ucsy(base_input_path, base_output_path): FILE: stanza/utils/datasets/ner/convert_nkjp.py function parse_xml (line 22) | def parse_xml(path): function get_node_id (line 30) | def get_node_id(node): function extract_entities_from_subfolder (line 35) | def extract_entities_from_subfolder(subfolder, nkjp_dir): function extract_unassigned_subfolder_entities (line 42) | def extract_unassigned_subfolder_entities(subfolder, nkjp_dir): function extract_entities_from_sentence (line 63) | def extract_entities_from_sentence(ner_sent): function clear_entities (line 89) | def clear_entities(entities): function resolve_entities (line 100) | def resolve_entities(entities): function resolve_entity (line 107) | def resolve_entity(entity, entities): function eliminate_overlapping_entities (line 121) | def eliminate_overlapping_entities(entities_list): function assign_entities (line 132) | def assign_entities(subfolder, subfolder_entities, nkjp_dir): function load_xml_nkjp (line 181) | def load_xml_nkjp(nkjp_dir): function split_dataset (line 194) | def split_dataset(dataset, shuffle=True, train_fraction=0.9, dev_fractio... function convert_nkjp (line 215) | def convert_nkjp(nkjp_path, output_dir): function main (line 256) | def main(): FILE: stanza/utils/datasets/ner/convert_nner22.py function convert_nner22 (line 14) | def convert_nner22(paths, short_name, include_space_char=True): FILE: stanza/utils/datasets/ner/convert_nytk.py function convert_nytk (line 5) | def convert_nytk(base_input_path, base_output_path, short_name): FILE: stanza/utils/datasets/ner/convert_ontonotes.py function convert_dataset_section (line 15) | def convert_dataset_section(config_name, section): function process_dataset (line 29) | def process_dataset(short_name, conll_path, ner_output_path): function main (line 50) | def main(): FILE: stanza/utils/datasets/ner/convert_rgai.py function read_rgai_file (line 12) | def read_rgai_file(filename, separator): function get_rgai_data (line 30) | def get_rgai_data(base_input_path, use_business, use_criminal): function convert_rgai (line 52) | def convert_rgai(base_input_path, base_output_path, short_name, use_busi... FILE: stanza/utils/datasets/ner/convert_sindhi_siner.py function fix_sentence (line 9) | def fix_sentence(sentence): function convert_sindhi_siner (line 35) | def convert_sindhi_siner(in_filename, out_directory, short_name, train_f... FILE: stanza/utils/datasets/ner/convert_starlang_ner.py function read_tree (line 17) | def read_tree(text): function read_starlang (line 47) | def read_starlang(paths): function main (line 50) | def main(): FILE: stanza/utils/datasets/ner/count_entities.py function parse_args (line 9) | def parse_args(): function count_entities (line 16) | def count_entities(*filenames): function main (line 33) | def main(): FILE: stanza/utils/datasets/ner/json_to_bio.py function convert_json_to_bio (line 12) | def convert_json_to_bio(input_filename, output_filename): function main (line 23) | def main(args=None): FILE: stanza/utils/datasets/ner/misc_to_date.py function ner_tags (line 26) | def ner_tags(pipe, sentence): FILE: stanza/utils/datasets/ner/ontonotes_multitag.py function convert_ontonotes_file (line 21) | def convert_ontonotes_file(filename, simplify, bigger_first): function convert_worldwide_file (line 45) | def convert_worldwide_file(filename, bigger_first): function build_multitag_dataset (line 66) | def build_multitag_dataset(base_output_path, short_name, simplify, bigge... function main (line 84) | def main(): FILE: stanza/utils/datasets/ner/prepare_ner_dataset.py function process_turku (line 530) | def process_turku(paths, short_name): function process_it_fbk (line 541) | def process_it_fbk(paths, short_name): function process_suralk_multiner (line 551) | def process_suralk_multiner(paths, short_name): function process_il_ner (line 570) | def process_il_ner(paths, short_name): function process_languk (line 623) | def process_languk(paths, short_name): function process_ijc (line 637) | def process_ijc(paths, short_name): function process_fire_2013 (line 668) | def process_fire_2013(paths, dataset): function process_wikiner (line 697) | def process_wikiner(paths, dataset): function process_french_wikiner_gold (line 728) | def process_french_wikiner_gold(paths, dataset): function process_french_wikiner_mixed (line 761) | def process_french_wikiner_mixed(paths, dataset): function get_rgai_input_path (line 894) | def get_rgai_input_path(paths): function process_rgai (line 897) | def process_rgai(paths, short_name): function get_nytk_input_path (line 916) | def get_nytk_input_path(paths): function process_nytk (line 919) | def process_nytk(paths, short_name): function concat_files (line 930) | def concat_files(output_file, *input_files): function process_hu_combined (line 948) | def process_hu_combined(paths, short_name): function process_bsnlp (line 967) | def process_bsnlp(paths, short_name): function process_nchlt (line 1010) | def process_nchlt(paths, short_name): function process_my_ucsy (line 1028) | def process_my_ucsy(paths, short_name): function process_fa_arman (line 1037) | def process_fa_arman(paths, short_name): function process_sv_suc3licensed (line 1062) | def process_sv_suc3licensed(paths, short_name): function process_sv_suc3shuffle (line 1078) | def process_sv_suc3shuffle(paths, short_name): function process_da_ddt (line 1096) | def process_da_ddt(paths, short_name): function process_norne (line 1125) | def process_norne(paths, short_name): function process_ja_gsd (line 1156) | def process_ja_gsd(paths, short_name): function process_starlang (line 1210) | def process_starlang(paths, short_name): function remap_germeval_tag (line 1225) | def remap_germeval_tag(tag): function process_de_germeval2014 (line 1244) | def process_de_germeval2014(paths, short_name): function process_hiner (line 1259) | def process_hiner(paths, short_name): function process_hinercollapsed (line 1263) | def process_hinercollapsed(paths, short_name): function process_lst20 (line 1267) | def process_lst20(paths, short_name, include_space_char=True): function process_nner22 (line 1270) | def process_nner22(paths, short_name, include_space_char=True): function process_mr_l3cube (line 1273) | def process_mr_l3cube(paths, short_name): function process_bn_daffodil (line 1285) | def process_bn_daffodil(paths, short_name): function process_pl_nkjp (line 1290) | def process_pl_nkjp(paths, short_name): function process_kk_kazNERD (line 1302) | def process_kk_kazNERD(paths, short_name): function process_masakhane (line 1307) | def process_masakhane(paths, dataset_name): function process_sd_siner (line 1348) | def process_sd_siner(paths, short_name): function process_en_worldwide_4class (line 1359) | def process_en_worldwide_4class(paths, short_name): function process_en_worldwide_9class (line 1370) | def process_en_worldwide_9class(paths, short_name): function process_en_ontonotes (line 1381) | def process_en_ontonotes(paths, short_name): function process_zh_ontonotes (line 1387) | def process_zh_ontonotes(paths, short_name): function process_en_conll03 (line 1393) | def process_en_conll03(paths, short_name): function process_en_conll03_worldwide (line 1399) | def process_en_conll03_worldwide(paths, short_name): function process_en_ontonotes_ww_multi (line 1417) | def process_en_ontonotes_ww_multi(paths, short_name): function process_en_combined (line 1428) | def process_en_combined(paths, short_name): function process_en_conllpp (line 1441) | def process_en_conllpp(paths, short_name): function process_armtdp (line 1456) | def process_armtdp(paths, short_name): function process_toy_dataset (line 1468) | def process_toy_dataset(paths, short_name): function process_ar_aqmar (line 1471) | def process_ar_aqmar(paths, short_name): function process_he_iahlt (line 1476) | def process_he_iahlt(paths, short_name): function process_ang_ewt (line 1483) | def process_ang_ewt(paths, short_name): function main (line 1533) | def main(dataset_name): FILE: stanza/utils/datasets/ner/prepare_ner_file.py function parse_args (line 14) | def parse_args(): function main (line 21) | def main(): function process_dataset (line 25) | def process_dataset(input_filename, output_filename): function load_conll03 (line 41) | def load_conll03(filename, skip_doc_start=True): function process_cache (line 65) | def process_cache(cached_lines): FILE: stanza/utils/datasets/ner/preprocess_wikiner.py function preprocess_wikiner (line 9) | def preprocess_wikiner(input_file, output_file, encoding="utf-8"): FILE: stanza/utils/datasets/ner/simplify_en_worldwide.py function isfloat (line 29) | def isfloat(num): function process_label (line 37) | def process_label(line, is_start=False): function write_new_file (line 94) | def write_new_file(save_dir, input_path, old_file, simplify): function copy_and_simplify (line 120) | def copy_and_simplify(base_path, simplify): function main (line 134) | def main(args=None): FILE: stanza/utils/datasets/ner/simplify_ontonotes_to_worldwide.py function simplify_ontonotes_to_worldwide (line 77) | def simplify_ontonotes_to_worldwide(entity): function convert_file (line 89) | def convert_file(in_file, out_file): function main (line 102) | def main(): FILE: stanza/utils/datasets/ner/split_wikiner.py function read_sentences (line 12) | def read_sentences(filename, encoding): function write_sentences_to_file (line 45) | def write_sentences_to_file(sents, filename): function remap_labels (line 53) | def remap_labels(sents, remap): function split_wikiner_data (line 62) | def split_wikiner_data(directory, sents, prefix="", suffix="bio", remap=... function split_wikiner (line 95) | def split_wikiner(directory, *in_filenames, encoding="utf-8", **kwargs): FILE: stanza/utils/datasets/ner/suc_conll_to_iob.py function extract (line 11) | def extract(infile, outfile): function extract_from_zip (line 48) | def extract_from_zip(zip_filename, in_filename, out_filename): function process_suc3 (line 63) | def process_suc3(zip_filename, short_name, out_dir): function main (line 68) | def main(): FILE: stanza/utils/datasets/ner/suc_to_iob.py function parse (line 32) | def parse(fp, skiptypes=[]): function ne_type_to_label (line 95) | def ne_type_to_label(ne_type): function name_type_to_label (line 101) | def name_type_to_label(name_type): function main (line 115) | def main(args=None): FILE: stanza/utils/datasets/ner/utils.py function bioes_to_bio (line 20) | def bioes_to_bio(tags): function convert_bioes_to_bio (line 36) | def convert_bioes_to_bio(base_input_path, base_output_path, short_name): function convert_bio_to_json (line 56) | def convert_bio_to_json(base_input_path, base_output_path, short_name, s... function get_tags (line 78) | def get_tags(datasets): function write_sentences (line 91) | def write_sentences(output_filename, dataset): function write_dataset (line 107) | def write_dataset(datasets, output_dir, short_name, suffix="bio", shard_... function write_multitag_json (line 124) | def write_multitag_json(output_filename, dataset): function write_multitag_dataset (line 137) | def write_multitag_dataset(datasets, output_dir, short_name, suffix="bio... function read_tsv (line 146) | def read_tsv(filename, text_column, annotation_column, remap_tag_fn=None... function random_shuffle_directory (line 207) | def random_shuffle_directory(input_dir, output_dir, short_name): function random_shuffle_files (line 212) | def random_shuffle_files(input_dir, input_files, output_dir, short_name): function random_shuffle_by_prefixes (line 262) | def random_shuffle_by_prefixes(input_dir, output_dir, short_name, prefix... function combine_dataset (line 296) | def combine_dataset(input_dir, output_dir, input_datasets, output_dataset): function read_prefix_file (line 310) | def read_prefix_file(destination_file): function read_json_entities (line 354) | def read_json_entities(filename): function list_doc_entities (line 365) | def list_doc_entities(doc): function combine_files (line 414) | def combine_files(output_filename, *input_filenames): FILE: stanza/utils/datasets/pos/convert_trees_to_pos.py function convert_file (line 31) | def convert_file(in_file, out_file, upos): function convert_treebank (line 64) | def convert_treebank(short_name, upos, output_name, paths): FILE: stanza/utils/datasets/pos/remove_columns.py function remove_columns (line 14) | def remove_columns(filename): FILE: stanza/utils/datasets/prepare_depparse_treebank.py class Tags (line 29) | class Tags(Enum): function add_specific_args (line 37) | def add_specific_args(parser) -> None: function choose_tagger_model (line 54) | def choose_tagger_model(short_language, dataset, tagger_model, args): function process_treebank (line 93) | def process_treebank(treebank, model_type, paths, args) -> None: function main (line 145) | def main() -> None: FILE: stanza/utils/datasets/prepare_lemma_classifier.py function process_treebank (line 12) | def process_treebank(paths, short_name, word, upos, allowed_lemmas, sect... function process_en_combined (line 35) | def process_en_combined(paths, short_name): function process_ja_gsd (line 69) | def process_ja_gsd(paths, short_name): function process_fa_perdt (line 84) | def process_fa_perdt(paths, short_name): function process_hi_hdtb (line 91) | def process_hi_hdtb(paths, short_name): function process_ar_padt (line 98) | def process_ar_padt(paths, short_name): function process_el_gdt (line 105) | def process_el_gdt(paths, short_name): function main (line 132) | def main(dataset_name): FILE: stanza/utils/datasets/prepare_lemma_treebank.py function add_specific_args (line 19) | def add_specific_args(parser) -> None: function check_lemmas (line 23) | def check_lemmas(train_file): function process_treebank (line 49) | def process_treebank(treebank, model_type, paths, args): function main (line 67) | def main(): FILE: stanza/utils/datasets/prepare_mwt_treebank.py function copy_conllu (line 29) | def copy_conllu(tokenizer_dir, mwt_dir, short_name, dataset, particle): function check_mwt_composition (line 34) | def check_mwt_composition(filename): function process_treebank (line 44) | def process_treebank(treebank, model_type, paths, args): function main (line 82) | def main(): FILE: stanza/utils/datasets/prepare_pos_treebank.py function copy_conllu_file_or_zip (line 18) | def copy_conllu_file_or_zip(tokenizer_dir, tokenizer_file, dest_dir, des... function process_treebank (line 29) | def process_treebank(treebank, model_type, paths, args): function main (line 32) | def main(): FILE: stanza/utils/datasets/prepare_tokenizer_data.py function is_para_break (line 22) | def is_para_break(index, text): function find_next_word (line 31) | def find_next_word(index, text, word, output): function main (line 58) | def main(args): FILE: stanza/utils/datasets/prepare_tokenizer_treebank.py function copy_conllu_file (line 46) | def copy_conllu_file(tokenizer_dir, tokenizer_file, dest_dir, dest_file,... function copy_conllu_treebank (line 56) | def copy_conllu_treebank(treebank, model_type, paths, dest_dir, postproc... function split_conllu_file (line 87) | def split_conllu_file(treebank, input_conllu, train_output_conllu, dev_o... function split_train_file (line 115) | def split_train_file(treebank, train_input_conllu, train_output_conllu, ... function has_space_after_no (line 140) | def has_space_after_no(piece): function remove_space_after_no (line 149) | def remove_space_after_no(piece, fail_if_missing=True): function add_space_after_no (line 165) | def add_space_after_no(piece, fail_if_found=True): function augment_telugu (line 175) | def augment_telugu(sents): function augment_comma_separations (line 221) | def augment_comma_separations(sents, ratio=0.03): function augment_move_comma (line 292) | def augment_move_comma(sents, ratio=0.02): function augment_apos (line 376) | def augment_apos(sents): function augment_ellipses (line 421) | def augment_ellipses(sents): function augment_quotes (line 472) | def augment_quotes(sents, ratio=0.15): function find_text_idx (line 540) | def find_text_idx(sentence): function change_indices (line 551) | def change_indices(line, delta): function augment_initial_punct (line 586) | def augment_initial_punct(sents, ratio=0.20): function augment_brackets (line 632) | def augment_brackets(sents, ratio=0.1): function augment_punct (line 673) | def augment_punct(sents): function remove_accents_from_words (line 690) | def remove_accents_from_words(sents): function augment_accents (line 704) | def augment_accents(sents): function write_augmented_dataset (line 707) | def write_augmented_dataset(input_conllu, output_conllu, augment_function): function remove_spaces_from_sentences (line 720) | def remove_spaces_from_sentences(sents): function remove_spaces (line 745) | def remove_spaces(input_conllu, output_conllu): function build_combined_korean_dataset (line 758) | def build_combined_korean_dataset(udbase_dir, tokenizer_dir, short_name,... function build_combined_korean (line 777) | def build_combined_korean(udbase_dir, tokenizer_dir, short_name): function build_combined_italian_dataset (line 782) | def build_combined_italian_dataset(paths, model_type, dataset): function check_gum_ready (line 809) | def check_gum_ready(udbase_dir): function build_combined_english_dataset (line 814) | def build_combined_english_dataset(paths, model_type, dataset): function add_english_sentence_final_punctuation (line 845) | def add_english_sentence_final_punctuation(handparsed_sentences): function build_extra_combined_french_dataset (line 880) | def build_extra_combined_french_dataset(paths, model_type, dataset): function build_extra_combined_german_dataset (line 899) | def build_extra_combined_german_dataset(paths, model_type, dataset): function build_extra_combined_english_dataset (line 916) | def build_extra_combined_english_dataset(paths, model_type, dataset): function build_extra_combined_italian_dataset (line 946) | def build_extra_combined_italian_dataset(paths, model_type, dataset): function replace_semicolons (line 966) | def replace_semicolons(sentences): function strip_column (line 994) | def strip_column(sents, column): function strip_xpos (line 1013) | def strip_xpos(sents): function strip_feats (line 1021) | def strip_feats(sents): function build_combined_japanese_dataset (line 1029) | def build_combined_japanese_dataset(paths, model_type, dataset): function build_combined_albanian_dataset (line 1060) | def build_combined_albanian_dataset(paths, model_type, dataset): function build_combined_german_dataset (line 1105) | def build_combined_german_dataset(paths, model_type, dataset): function build_combined_spanish_dataset (line 1124) | def build_combined_spanish_dataset(paths, model_type, dataset): function build_combined_french_dataset (line 1176) | def build_combined_french_dataset(paths, model_type, dataset): function build_combined_hebrew_dataset (line 1200) | def build_combined_hebrew_dataset(paths, model_type, dataset): function build_combined_dataset (line 1256) | def build_combined_dataset(paths, short_name, model_type, augment): function build_bio_dataset (line 1283) | def build_bio_dataset(paths, udbase_dir, tokenizer_dir, handparsed_dir, ... function build_combined_english_gum_dataset (line 1306) | def build_combined_english_gum_dataset(udbase_dir, tokenizer_dir, short_... function build_combined_english_gum (line 1328) | def build_combined_english_gum(udbase_dir, tokenizer_dir, short_name, au... function prepare_ud_dataset (line 1332) | def prepare_ud_dataset(treebank, udbase_dir, tokenizer_dir, short_name, ... function process_ud_treebank (line 1351) | def process_ud_treebank(treebank, udbase_dir, tokenizer_dir, short_name,... function process_test_only_ud_treebank (line 1364) | def process_test_only_ud_treebank(treebank, udbase_dir, tokenizer_dir, s... function process_partial_ud_treebank (line 1393) | def process_partial_ud_treebank(treebank, udbase_dir, tokenizer_dir, sho... function add_specific_args (line 1436) | def add_specific_args(parser): function process_treebank (line 1445) | def process_treebank(treebank, model_type, paths, args): function main (line 1511) | def main(): FILE: stanza/utils/datasets/pretrain/word_in_pretrain.py function main (line 11) | def main(): FILE: stanza/utils/datasets/random_split_conllu.py function random_split (line 17) | def random_split(doc, weights, remove_xpos=False, remove_feats=False): function main (line 40) | def main(): FILE: stanza/utils/datasets/sentiment/add_constituency.py function main (line 20) | def main(): FILE: stanza/utils/datasets/sentiment/convert_italian_poetry_classification.py function main (line 17) | def main(): FILE: stanza/utils/datasets/sentiment/convert_italian_sentence_classification.py function label_trees (line 21) | def label_trees(label_map, trees): function read_label_map (line 30) | def read_label_map(label_filename): function main (line 63) | def main(): FILE: stanza/utils/datasets/sentiment/prepare_sentiment_dataset.py function convert_sst_general (line 284) | def convert_sst_general(paths, dataset_name, version): function convert_sst2 (line 295) | def convert_sst2(paths, dataset_name, *args): function convert_sst2roots (line 301) | def convert_sst2roots(paths, dataset_name, *args): function convert_sst3 (line 307) | def convert_sst3(paths, dataset_name, *args): function convert_sst3roots (line 313) | def convert_sst3roots(paths, dataset_name, *args): function convert_sstplus (line 319) | def convert_sstplus(paths, dataset_name, *args): function convert_meld (line 342) | def convert_meld(paths, dataset_name, *args): function convert_corona (line 350) | def convert_corona(paths, dataset_name, *args): function convert_scare (line 356) | def convert_scare(paths, dataset_name, *args): function convert_de_usage (line 362) | def convert_de_usage(paths, dataset_name, *args): function convert_sb10k (line 367) | def convert_sb10k(paths, dataset_name, *args): function convert_vi_vsfc (line 387) | def convert_vi_vsfc(paths, dataset_name, *args): function convert_hi_odiagenai (line 392) | def convert_hi_odiagenai(paths, dataset_name, *args): function convert_mr_l3cube (line 419) | def convert_mr_l3cube(paths, dataset_name, *args): function convert_es_tass2020 (line 434) | def convert_es_tass2020(paths, dataset_name, *args): function convert_it_sentipolc16 (line 437) | def convert_it_sentipolc16(paths, dataset_name, *args): function convert_ren (line 443) | def convert_ren(paths, dataset_name, *args): function main (line 474) | def main(dataset_name, *args): FILE: stanza/utils/datasets/sentiment/process_MELD.py function get_phrases (line 34) | def get_phrases(in_filename): function get_tokenized_phrases (line 57) | def get_tokenized_phrases(split, in_directory): function main (line 68) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_airline.py function get_phrases (line 30) | def get_phrases(in_directory): function get_tokenized_phrases (line 53) | def get_tokenized_phrases(in_directory): function main (line 60) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_arguana_xml.py function get_phrases (line 25) | def get_phrases(filename): function get_phrases_from_directory (line 54) | def get_phrases_from_directory(directory): function get_tokenized_phrases (line 61) | def get_tokenized_phrases(in_directory): function main (line 67) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_corona.py function main (line 31) | def main(args=None): FILE: stanza/utils/datasets/sentiment/process_es_tass2020.py function convert_label (line 34) | def convert_label(label): function read_test_labels (line 46) | def read_test_labels(fin): function open_read_test_labels (line 69) | def open_read_test_labels(filename, zip_filename=None): function read_sentences (line 86) | def read_sentences(fin): function open_read_sentences (line 99) | def open_read_sentences(filename, zip_filename): function combine_test_set (line 113) | def combine_test_set(sentences, labels): function tokenize (line 132) | def tokenize(sentiment_data, pipe): function read_test_set (line 148) | def read_test_set(label_zip_filename, label_filename, sentence_zip_filen... function read_train_file (line 159) | def read_train_file(zip_filename, filename, pipe): function convert_tass2020 (line 188) | def convert_tass2020(in_directory, out_directory, dataset_name): function main (line 239) | def main(paths): FILE: stanza/utils/datasets/sentiment/process_it_sentipolc16.py class Mode (line 20) | class Mode(Enum): function main (line 26) | def main(in_dir, out_dir, short_name, *args): FILE: stanza/utils/datasets/sentiment/process_ren_chinese.py function get_phrases (line 29) | def get_phrases(filename): function read_snippets (line 61) | def read_snippets(xml_directory): function main (line 75) | def main(xml_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_sb10k.py class Split (line 29) | class Split(Enum): function main (line 38) | def main(args=None): FILE: stanza/utils/datasets/sentiment/process_scare.py function get_scare_snippets (line 27) | def get_scare_snippets(nlp, csv_dir_path, text_id_map, filename_pattern=... function main (line 68) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_slsd.py function get_phrases (line 28) | def get_phrases(in_directory): function get_tokenized_phrases (line 54) | def get_tokenized_phrases(in_directory): function main (line 60) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_sst.py function get_subtrees (line 22) | def get_subtrees(input_file, *args): function get_phrases (line 41) | def get_phrases(dataset, treebank_file, input_dir): function convert_version (line 51) | def convert_version(dataset, treebank_file, input_dir, output_dir): function parse_args (line 61) | def parse_args(): function main (line 72) | def main(): FILE: stanza/utils/datasets/sentiment/process_usage_german.py function main (line 24) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/sentiment/process_utils.py function write_list (line 18) | def write_list(out_filename, dataset): function write_dataset (line 41) | def write_dataset(dataset, out_directory, dataset_name): function write_splits (line 51) | def write_splits(out_directory, snippets, splits): function clean_tokenized_tweet (line 69) | def clean_tokenized_tweet(line): function get_ptb_tokenized_phrases (line 83) | def get_ptb_tokenized_phrases(dataset): function process_datum (line 111) | def process_datum(nlp, text, mapping, sentiment): function read_snippets (line 124) | def read_snippets(csv_filename, sentiment_column, text_column, tokenizer... FILE: stanza/utils/datasets/sentiment/process_vsfc_vietnamese.py function combine_columns (line 21) | def combine_columns(in_directory, dataset, nlp): function main (line 38) | def main(in_directory, out_directory, short_name): FILE: stanza/utils/datasets/thai_syllable_dict_generator.py function create_dictionary (line 6) | def create_dictionary(dataset_dir, save_dir): FILE: stanza/utils/datasets/tokenization/convert_ml_cochin.py function read_words (line 50) | def read_words(filename): function read_original_text (line 56) | def read_original_text(input_dir): function list_relabeled_files (line 60) | def list_relabeled_files(relabeled_dir): function find_word (line 66) | def find_word(original_text, target, start_index, end_index): function scan_file (line 72) | def scan_file(original_text, current_index, tsv_file): function split_sentences (line 161) | def split_sentences(sentences): function main (line 177) | def main(input_dir, tokenizer_dir, relabeled_dir="relabeled_tsv", split_... FILE: stanza/utils/datasets/tokenization/convert_my_alt.py function read_split (line 37) | def read_split(input_dir, section): function read_dataset_splits (line 69) | def read_dataset_splits(input_dir): function read_alt_treebank (line 80) | def read_alt_treebank(constituency_input_dir): function write_sentence (line 129) | def write_sentence(fout, words, spaces): function write_dataset (line 155) | def write_dataset(filename, trees, split): function convert_my_alt (line 173) | def convert_my_alt(constituency_input_dir, tokenizer_dir): function main (line 185) | def main(): FILE: stanza/utils/datasets/tokenization/convert_text_files.py function read_tokens_file (line 14) | def read_tokens_file(token_file): function read_sentences_file (line 36) | def read_sentences_file(sentence_file): function process_raw_file (line 46) | def process_raw_file(text_file, token_file, sentence_file, base_sent_idx... function extract_sentences (line 106) | def extract_sentences(dataset_files): function split_sentences (line 113) | def split_sentences(sentences, train_split=0.8, dev_split=0.1): function find_dataset_files (line 132) | def find_dataset_files(input_path, token_prefix, sentence_prefix): function main (line 173) | def main(): FILE: stanza/utils/datasets/tokenization/convert_th_best.py function clean_line (line 35) | def clean_line(line): function clean_word (line 61) | def clean_word(word): function read_data (line 89) | def read_data(input_dir): function main (line 152) | def main(*args): FILE: stanza/utils/datasets/tokenization/convert_th_lst20.py function read_document (line 24) | def read_document(lines, spaces_after, split_clauses): function retokenize_document (line 59) | def retokenize_document(lines): function read_data (line 82) | def read_data(input_dir, section, resegment, spaces_after, split_clauses): function add_lst20_args (line 99) | def add_lst20_args(parser): function parse_lst20_args (line 104) | def parse_lst20_args(): function convert (line 113) | def convert(input_dir, output_dir, args): function main (line 126) | def main(): FILE: stanza/utils/datasets/tokenization/convert_th_orchid.py function read_data (line 94) | def read_data(input_filename): function parse_xml (line 102) | def parse_xml(tree): function main (line 150) | def main(*args): FILE: stanza/utils/datasets/tokenization/convert_vi_vlsp.py function find_spaces (line 6) | def find_spaces(sentence): function add_vlsp_args (line 40) | def add_vlsp_args(parser): function write_file (line 45) | def write_file(vlsp_include_spaces, output_filename, sentences, shard): function convert_pos_dataset (line 83) | def convert_pos_dataset(file_path): function convert_file (line 101) | def convert_file(vlsp_include_spaces, input_filename, output_filename, s... function convert_vi_vlsp (line 131) | def convert_vi_vlsp(extern_dir, tokenizer_dir, args): FILE: stanza/utils/datasets/tokenization/process_thai_tokenization.py function write_section (line 9) | def write_section(output_dir, dataset_name, section, documents): function write_dataset (line 71) | def write_dataset(documents, output_dir, dataset_name): function write_dataset_best (line 83) | def write_dataset_best(documents, test_documents, output_dir, dataset_na... function reprocess_lines (line 96) | def reprocess_lines(processed_lines): function convert_processed_lines (line 146) | def convert_processed_lines(processed_lines): FILE: stanza/utils/datasets/vietnamese/renormalize.py function replace_all (line 83) | def replace_all(text): function convert_file (line 88) | def convert_file(org_file, new_file): function convert_files (line 95) | def convert_files(file_list, new_dir): function convert_dir (line 103) | def convert_dir(org_dir, new_dir, suffix): function main (line 110) | def main(): FILE: stanza/utils/default_paths.py function get_default_paths (line 3) | def get_default_paths(): FILE: stanza/utils/get_tqdm.py function get_tqdm (line 3) | def get_tqdm(): FILE: stanza/utils/helper_func.py function make_table (line 1) | def make_table(header, content, column_width=None): FILE: stanza/utils/languages/kazakh_transliteration.py function create_dic (line 250) | def create_dic(source_alph, target_alph, mult_mapping, empty_mapping): function transliterate (line 276) | def transliterate(source): FILE: stanza/utils/max_mwt_length.py function max_mwt_length (line 5) | def max_mwt_length(filenames): FILE: stanza/utils/ner/flair_ner_tag_dataset.py function test_file (line 14) | def test_file(eval_file, tagger): function main (line 48) | def main(): FILE: stanza/utils/ner/paying_annotators.py function get_worker_subs (line 5) | def get_worker_subs(json_string): function track_tasks (line 19) | def track_tasks(input_path, worker_map=None): function main (line 52) | def main(): FILE: stanza/utils/ner/spacy_ner_tag_dataset.py function test_file (line 55) | def test_file(eval_file, tagger, simplify): function main (line 90) | def main(): FILE: stanza/utils/training/common.py class Mode (line 25) | class Mode(Enum): class ArgumentParserWithExtraHelp (line 31) | class ArgumentParserWithExtraHelp(argparse.ArgumentParser): method __init__ (line 32) | def __init__(self, sub_argparse, *args, **kwargs): method print_help (line 37) | def print_help(self, file=None): method format_help (line 40) | def format_help(self): function build_argparse (line 55) | def build_argparse(sub_argparse=None): function add_charlm_args (line 77) | def add_charlm_args(parser): function main (line 81) | def main(run_treebank, model_dir, model_name, add_specific_args=None, su... function run_eval_script (line 203) | def run_eval_script(gold_conllu_file, system_conllu_file, evals=None): function run_eval_script_tokens (line 216) | def run_eval_script_tokens(eval_gold, eval_pred): function run_eval_script_mwt (line 219) | def run_eval_script_mwt(eval_gold, eval_pred): function run_eval_script_pos (line 222) | def run_eval_script_pos(eval_gold, eval_pred): function run_eval_script_depparse (line 225) | def run_eval_script_depparse(eval_gold, eval_pred): function find_wordvec_pretrain (line 229) | def find_wordvec_pretrain(language, default_pretrains, dataset_pretrains... function choose_depparse_pretrain (line 277) | def choose_depparse_pretrain(language, dataset): function find_charlm_file (line 282) | def find_charlm_file(direction, language, charlm, model_dir=DEFAULT_MODE... function build_charlm_args (line 308) | def build_charlm_args(language, charlm, base_args=True, model_dir=DEFAUL... function choose_charlm (line 343) | def choose_charlm(language, dataset, charlm, language_charlms, dataset_c... function choose_pos_charlm (line 364) | def choose_pos_charlm(short_language, dataset, charlm): function choose_depparse_charlm (line 371) | def choose_depparse_charlm(short_language, dataset, charlm): function choose_lemma_charlm (line 378) | def choose_lemma_charlm(short_language, dataset, charlm): function choose_tokenizer_charlm (line 385) | def choose_tokenizer_charlm(short_language, dataset, charlm): function choose_transformer (line 392) | def choose_transformer(short_language, command_args, extra_args, warn=Tr... function build_pos_charlm_args (line 407) | def build_pos_charlm_args(short_language, dataset, charlm, base_args=Tru... function build_lemma_charlm_args (line 412) | def build_lemma_charlm_args(short_language, dataset, charlm, base_args=T... function build_depparse_charlm_args (line 417) | def build_depparse_charlm_args(short_language, dataset, charlm, base_arg... function build_tokenizer_charlm_args (line 422) | def build_tokenizer_charlm_args(short_language, dataset, charlm, base_ar... function build_wordvec_args (line 428) | def build_wordvec_args(short_language, dataset, extra_args, task_pretrai... function build_pos_wordvec_args (line 445) | def build_pos_wordvec_args(short_language, dataset, extra_args): function build_depparse_wordvec_args (line 448) | def build_depparse_wordvec_args(short_language, dataset, extra_args): FILE: stanza/utils/training/remove_constituency_optimizer.py function parse_args (line 26) | def parse_args(): function main (line 40) | def main(): FILE: stanza/utils/training/run_charlm.py function add_charlm_args (line 15) | def add_charlm_args(parser): function run_treebank (line 24) | def run_treebank(mode, paths, treebank, short_name, function get_model_name (line 75) | def get_model_name(args): function main (line 81) | def main(): FILE: stanza/utils/training/run_constituency.py function add_constituency_args (line 25) | def add_constituency_args(parser): function build_wordvec_args (line 32) | def build_wordvec_args(short_language, dataset, extra_args): function build_default_args (line 42) | def build_default_args(paths, short_language, dataset, command_args, ext... function build_model_filename (line 58) | def build_model_filename(paths, short_name, command_args, extra_args): function run_treebank (line 75) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 125) | def main(): FILE: stanza/utils/training/run_depparse.py function add_depparse_args (line 15) | def add_depparse_args(parser): function build_model_filename (line 21) | def build_model_filename(paths, short_name, command_args, extra_args): function run_treebank (line 43) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 141) | def main(): FILE: stanza/utils/training/run_ete.py function add_args (line 43) | def add_args(parser): function run_ete (line 47) | def run_ete(paths, dataset, short_name, command_args, extra_args): function run_treebank (line 176) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 193) | def main(): FILE: stanza/utils/training/run_lemma.py function add_lemma_args (line 32) | def add_lemma_args(parser): function build_model_filename (line 40) | def build_model_filename(paths, short_name, command_args, extra_args): function run_treebank (line 73) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 175) | def main(): FILE: stanza/utils/training/run_lemma_classifier.py function add_lemma_args (line 12) | def add_lemma_args(parser): function build_model_filename (line 18) | def build_model_filename(paths, short_name, command_args, extra_args): function run_treebank (line 21) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 81) | def main(args=None): FILE: stanza/utils/training/run_mwt.py function check_mwt (line 33) | def check_mwt(filename): function run_treebank (line 41) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 124) | def main(): FILE: stanza/utils/training/run_ner.py function add_ner_args (line 45) | def add_ner_args(parser): function build_pretrain_args (line 51) | def build_pretrain_args(language, dataset, charlm="default", command_arg... function build_model_filename (line 70) | def build_model_filename(paths, short_name, command_args, extra_args): function run_treebank (line 96) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 153) | def main(): FILE: stanza/utils/training/run_pos.py function add_pos_args (line 13) | def add_pos_args(parser): function build_model_filename (line 18) | def build_model_filename(paths, short_name, command_args, extra_args): function run_treebank (line 40) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 133) | def main(): FILE: stanza/utils/training/run_sentiment.py function add_sentiment_args (line 22) | def add_sentiment_args(parser): function build_default_args (line 34) | def build_default_args(paths, short_language, dataset, command_args, ext... function build_model_filename (line 53) | def build_model_filename(paths, short_name, command_args, extra_args): function run_dataset (line 69) | def run_dataset(mode, paths, treebank, short_name, command_args, extra_a... function main (line 116) | def main(): FILE: stanza/utils/training/run_tokenizer.py function add_tokenizer_args (line 34) | def add_tokenizer_args(parser): function build_model_filename (line 38) | def build_model_filename(paths, short_name, command_args, extra_args): function uses_dictionary (line 58) | def uses_dictionary(short_language): function run_treebank (line 69) | def run_treebank(mode, paths, treebank, short_name, command_args, extra_... function main (line 162) | def main(): FILE: stanza/utils/training/separate_ner_pretrain.py function main (line 37) | def main(): FILE: stanza/utils/visualization/conll_deprel_visualization.py function conll_to_visual (line 10) | def conll_to_visual(conll_file, pipeline, sent_count=10, display_all=Fal... function main (line 67) | def main(): FILE: stanza/utils/visualization/dependency_visualization.py function visualize_doc (line 12) | def visualize_doc(doc, language): function visualize_str (line 57) | def visualize_str(text, pipeline_code, pipe): function visualize_docs (line 72) | def visualize_docs(docs, lang_code): function visualize_strings (line 83) | def visualize_strings(texts, lang_code): function main (line 95) | def main(): FILE: stanza/utils/visualization/ner_visualization.py function visualize_ner_doc (line 14) | def visualize_ner_doc(doc, language, select=None, colors=None): function visualize_ner_str (line 90) | def visualize_ner_str(text, pipe, select=None, colors=None): function visualize_strings (line 105) | def visualize_strings(texts, language_code, select=None, colors=None): function visualize_docs (line 124) | def visualize_docs(docs, language_code, select=None, colors=None): function main (line 141) | def main(): FILE: stanza/utils/visualization/semgrex_app.py function get_semgrex_text_and_query (line 21) | def get_semgrex_text_and_query() -> Tuple[str, str]: function get_file_input (line 40) | def get_file_input() -> List[str]: function get_semgrex_window_input (line 59) | def get_semgrex_window_input() -> Tuple[bool, int, int]: function get_pos_input (line 87) | def get_pos_input() -> bool: function get_input (line 96) | def get_input() -> Tuple[str, str, List[str], Tuple[bool, int, int, bool]]: function run_semgrex_process (line 107) | def run_semgrex_process( function semgrex_state (line 215) | def semgrex_state(): function ssurgeon_state (line 255) | def ssurgeon_state(): function main (line 361) | def main(): FILE: stanza/utils/visualization/semgrex_visualizer.py function get_sentences_html (line 21) | def get_sentences_html(doc: Any, language: str, visualize_xpos: bool = F... function semgrexify_html (line 97) | def semgrexify_html(orig_html: str, semgrex_sentence) -> str: function render_html_strings (line 237) | def render_html_strings(edited_html_strings: List[str]) -> None: function visualize_search_doc (line 245) | def visualize_search_doc( function visualize_search_str (line 304) | def visualize_search_str( function adjust_dep_arrows (line 346) | def adjust_dep_arrows(raw_html: str) -> str: function edit_dep_arrow (line 394) | def edit_dep_arrow(arrow_html: str) -> str: function edit_html_overflow (line 523) | def edit_html_overflow(html_string: str) -> str: function main (line 554) | def main(): FILE: stanza/utils/visualization/ssurgeon_visualizer.py function generate_edited_deprel_unadjusted (line 14) | def generate_edited_deprel_unadjusted(edited_doc, lang_code, visualize_x... function visualize_ssurgeon_deprel_adjusted_str_input (line 25) | def visualize_ssurgeon_deprel_adjusted_str_input(input_str, semgrex_quer... function main (line 48) | def main(): FILE: stanza/utils/visualization/utils.py function find_nth (line 1) | def find_nth(haystack, needle, n): function round_base (line 12) | def round_base(num, base=10):