SYMBOL INDEX (1080 symbols across 167 files) FILE: deeppavlov/__init__.py function train_model (line 29) | def train_model(config: [str, Path, dict], install: bool = False, function evaluate_model (line 35) | def evaluate_model(config: [str, Path, dict], install: bool = False, FILE: deeppavlov/configs/__init__.py class Struct (line 5) | class Struct: method __iter__ (line 6) | def __iter__(self) -> Iterator[str]: method __len__ (line 9) | def __len__(self) -> int: method __init__ (line 12) | def __init__(self, tree: Dict[str, Union[dict, Path]]) -> None: method _asdict (line 23) | def _asdict(self, *, to_string: bool=False) -> dict: method __getitem__ (line 35) | def __getitem__(self, key: str) -> Union[dict, Path]: method __dir__ (line 44) | def __dir__(self) -> Iterable: method _ipython_key_completions_ (line 47) | def _ipython_key_completions_(self) -> Iterable: method __str__ (line 50) | def __str__(self) -> str: method __repr__ (line 53) | def __repr__(self) -> str: method _repr_pretty_ (line 56) | def _repr_pretty_(self, p, cycle): function _build_configs_tree (line 70) | def _build_configs_tree() -> Struct: FILE: deeppavlov/core/commands/infer.py function build_model (line 31) | def build_model(config: Union[str, Path, dict], mode: str = 'infer', function interact_model (line 70) | def interact_model(config: Union[str, Path, dict]) -> None: function predict_on_stream (line 89) | def predict_on_stream(config: Union[str, Path, dict], FILE: deeppavlov/core/commands/train.py function read_data_by_config (line 32) | def read_data_by_config(config: dict): function get_iterator_from_config (line 61) | def get_iterator_from_config(config: dict, data: dict): function train_evaluate_model_from_config (line 69) | def train_evaluate_model_from_config(config: Union[str, Path, dict], FILE: deeppavlov/core/commands/utils.py function _parse_config_property (line 27) | def _parse_config_property(item: _T, variables: Dict[str, Union[str, Pat... function _get_variables_from_config (line 42) | def _get_variables_from_config(config: Union[str, Path, dict]): function _update_requirements (line 65) | def _update_requirements(config: dict) -> dict: function _overwrite (line 93) | def _overwrite(data: Any, value: Any, nested_keys: list) -> None: function parse_config (line 110) | def parse_config(config: Union[str, Path, dict], overwrite: Optional[dic... function expand_path (line 135) | def expand_path(path: Union[str, Path]) -> Path: function import_packages (line 140) | def import_packages(packages: list) -> None: function parse_value_with_config (line 146) | def parse_value_with_config(value: Union[str, Path], config: Union[str, ... FILE: deeppavlov/core/common/base.py class Element (line 22) | class Element: method __init__ (line 24) | def __init__(self, component: Union[Component, FunctionType], class Model (line 46) | class Model(Chainer): method __init__ (line 48) | def __init__(self, x: Optional[Union[str, list]] = None, FILE: deeppavlov/core/common/chainer.py class Chainer (line 29) | class Chainer(Component): method __init__ (line 50) | def __init__(self, in_x: Union[str, list] = None, out_params: Union[st... method __getitem__ (line 71) | def __getitem__(self, item): method _ipython_key_completions_ (line 77) | def _ipython_key_completions_(self): method __repr__ (line 80) | def __repr__(self): method _repr_pretty_ (line 98) | def _repr_pretty_(self, p, cycle): method append (line 127) | def append(self, component: Union[Component, FunctionType], in_x: [str... method compute (line 185) | def compute(self, x, y=None, targets=None): method __call__ (line 206) | def __call__(self, *args): method _compute (line 210) | def _compute(*args, param_names, pipe, targets): method batched_call (line 241) | def batched_call(self, *args: Reversible, batch_size: int = 16) -> Uni... method get_main_component (line 271) | def get_main_component(self) -> Optional[Serializable]: method save (line 278) | def save(self) -> None: method load (line 283) | def load(self) -> None: method reset (line 288) | def reset(self) -> None: method destroy (line 293) | def destroy(self): FILE: deeppavlov/core/common/cross_validation.py function change_savepath_for_model (line 33) | def change_savepath_for_model(config): function delete_dir_for_saved_models (line 49) | def delete_dir_for_saved_models(dirs_for_saved_models): function create_dirs_to_save_models (line 54) | def create_dirs_to_save_models(dirs_for_saved_models): function generate_train_valid (line 59) | def generate_train_valid(data, n_folds=5, is_loo=False): function calc_cv_score (line 85) | def calc_cv_score(config, data=None, n_folds=5, is_loo=False): FILE: deeppavlov/core/common/errors.py class ConfigError (line 20) | class ConfigError(Exception): method __init__ (line 23) | def __init__(self, message): method __str__ (line 27) | def __str__(self): FILE: deeppavlov/core/common/file.py function find_config (line 36) | def find_config(pipeline_config_path: Union[str, Path]) -> Path: function read_json (line 52) | def read_json(fpath: Union[str, Path]) -> dict: function save_json (line 57) | def save_json(data: dict, fpath: Union[str, Path]) -> None: function save_pickle (line 62) | def save_pickle(data: dict, fpath: Union[str, Path]) -> None: function load_pickle (line 67) | def load_pickle(fpath: Union[str, Path]) -> Any: function save_jsonl (line 72) | def save_jsonl(data: Iterable[dict], fpath: Union[str, Path]) -> None: FILE: deeppavlov/core/common/log.py class ProbeFilter (line 33) | class ProbeFilter(logging.Filter): method filter (line 36) | def filter(self, record: logging.LogRecord) -> bool: function init_logger (line 41) | def init_logger(): FILE: deeppavlov/core/common/log_events.py class TBWriter (line 22) | class TBWriter: method __init__ (line 23) | def __init__(self, tensorboard_log_dir: str): method write_train (line 31) | def write_train(self, tag, scalar_value, global_step): method write_valid (line 34) | def write_valid(self, tag, scalar_value, global_step): method flush (line 37) | def flush(self): function get_tb_writer (line 42) | def get_tb_writer(tensorboard_log_dir: Optional[str]) -> Optional[TBWrit... FILE: deeppavlov/core/common/metrics_registry.py function fn_from_str (line 33) | def fn_from_str(name: str) -> Callable[..., Any]: function register_metric (line 46) | def register_metric(metric_name: str) -> Callable[..., Any]: function get_metric_by_name (line 60) | def get_metric_by_name(name: str) -> Callable[..., Any]: FILE: deeppavlov/core/common/params.py function resolve (line 30) | def resolve(val): function _init_param (line 45) | def _init_param(param, mode): function from_params (line 58) | def from_params(params: Dict, mode: str = 'infer', **kwargs) -> Union[Co... FILE: deeppavlov/core/common/params_search.py class ParamsSearch (line 28) | class ParamsSearch: method __init__ (line 47) | def __init__(self, method find_model_path (line 73) | def find_model_path(self, config: dict, key_model: str, path: list = [... method insert_value_or_dict_into_config (line 99) | def insert_value_or_dict_into_config(config: dict, path: list, method get_value_from_config (line 123) | def get_value_from_config(config: dict, path: list) -> Any: method remove_key_from_config (line 146) | def remove_key_from_config(config: dict, path: list) -> Tuple[dict, Any]: method initialize_params_in_config (line 169) | def initialize_params_in_config(self, basic_config: dict, paths: List[... method sample_params (line 195) | def sample_params(self, **params) -> dict: method _sample_from_ranges (line 229) | def _sample_from_ranges(self, opts: dict) -> [int, float]: method _sample_log (line 252) | def _sample_log(from_: float = 0., to_: float = 1.) -> float: FILE: deeppavlov/core/common/paths.py function get_settings_path (line 30) | def get_settings_path() -> Path: function populate_settings_dir (line 36) | def populate_settings_dir(force: bool = False) -> bool: FILE: deeppavlov/core/common/prints.py class RedirectedPrints (line 19) | class RedirectedPrints(redirect_stdout): method __init__ (line 22) | def __init__(self, new_target=sys.stderr): FILE: deeppavlov/core/common/registry.py function cls_from_str (line 34) | def cls_from_str(name: str) -> type: function register (line 45) | def register(name: str = None) -> type: function short_name (line 63) | def short_name(cls: type) -> str: function get_model (line 68) | def get_model(name: str) -> type: function list_models (line 77) | def list_models() -> list: FILE: deeppavlov/core/data/data_fitting_iterator.py class DataFittingIterator (line 25) | class DataFittingIterator: method __init__ (line 44) | def __init__(self, data: List[str], doc_ids: List[Any] = None, method get_doc_ids (line 53) | def get_doc_ids(self): method get_doc_content (line 61) | def get_doc_content(self, doc_id: Any) -> Optional[str]: method gen_batches (line 73) | def gen_batches(self, batch_size: int, shuffle: bool = None) \ method get_instances (line 109) | def get_instances(self): FILE: deeppavlov/core/data/data_learning_iterator.py class DataLearningIterator (line 22) | class DataLearningIterator: method split (line 35) | def split(self, *args, **kwargs): method preprocess (line 39) | def preprocess(self, data: List[Tuple[Any, Any]], *args, **kwargs) -> ... method __init__ (line 43) | def __init__(self, data: Dict[str, List[Tuple[Any, Any]]], seed: int =... method gen_batches (line 60) | def gen_batches(self, batch_size: int, data_type: str = 'train', method get_instances (line 91) | def get_instances(self, data_type: str = 'train') -> Tuple[tuple, tuple]: FILE: deeppavlov/core/data/dataset_reader.py class DatasetReader (line 18) | class DatasetReader: method read (line 21) | def read(self, data_path: str, *args, **kwargs) -> Dict[str, List[Tupl... FILE: deeppavlov/core/data/simple_vocab.py class SimpleVocabulary (line 31) | class SimpleVocabulary(Estimator): method __init__ (line 44) | def __init__(self, method fit (line 64) | def fit(self, *args): method _add_tokens_with_freqs (line 81) | def _add_tokens_with_freqs(self, tokens, freqs): method __call__ (line 90) | def __call__(self, batch, is_top=True, **kwargs): method save (line 103) | def save(self): method load (line 111) | def load(self): method load_line (line 128) | def load_line(self, ln): method len (line 137) | def len(self): method keys (line 140) | def keys(self): method values (line 143) | def values(self): method items (line 146) | def items(self): method __getitem__ (line 149) | def __getitem__(self, key): method __contains__ (line 157) | def __contains__(self, item): method __len__ (line 160) | def __len__(self): method reset (line 163) | def reset(self): method idxs2toks (line 172) | def idxs2toks(self, idxs): FILE: deeppavlov/core/data/utils.py function get_download_token (line 40) | def get_download_token() -> str: function s3_download (line 60) | def s3_download(url: str, destination: str) -> None: function simple_download (line 81) | def simple_download(url: str, destination: Union[Path, str], headers: Op... function download (line 152) | def download(dest_file_path: [List[Union[str, Path]]], source_url: str, ... function untar (line 199) | def untar(file_path: Union[Path, str], extract_folder: Optional[Union[Pa... function ungzip (line 216) | def ungzip(file_path: Union[Path, str], extract_path: Optional[Union[Pat... function download_decompress (line 238) | def download_decompress(url: str, function _copytree (line 310) | def _copytree(src: Path, dest: Path) -> None: function file_md5 (line 329) | def file_md5(fpath: Union[str, Path], chunk_size: int = 2 ** 16) -> Opti... function mark_done (line 350) | def mark_done(path: Union[Path, str]) -> None: function is_done (line 367) | def is_done(path: Union[Path, str]) -> bool: function _get_all_dimensions (line 381) | def _get_all_dimensions(batch: Sequence, level: int = 0, res: Optional[L... function get_dimensions (line 410) | def get_dimensions(batch: Sequence) -> List[int]: function zero_pad (line 415) | def zero_pad(batch: Sequence, function is_str_batch (line 449) | def is_str_batch(batch: Iterable) -> bool: function flatten_str_batch (line 466) | def flatten_str_batch(batch: Union[str, Iterable]) -> Union[list, chain]: function zero_pad_truncate (line 486) | def zero_pad_truncate(batch: Sequence[Sequence[Union[int, float, np.inte... function get_all_elems_from_json (line 520) | def get_all_elems_from_json(search_json: dict, search_key: str) -> list: function check_nested_dict_keys (line 549) | def check_nested_dict_keys(check_dict: dict, keys: list) -> bool: function jsonify_data (line 581) | def jsonify_data(data: Any) -> Any: function chunk_generator (line 613) | def chunk_generator(items_list: list, chunk_size: int) -> Generator[list... function update_dict_recursive (line 628) | def update_dict_recursive(editable_dict: dict, editing_dict: Mapping) ->... function path_set_md5 (line 645) | def path_set_md5(url: str) -> str: function set_query_parameter (line 661) | def set_query_parameter(url: str, param_name: str, param_value: str) -> ... FILE: deeppavlov/core/models/component.py class Component (line 22) | class Component(metaclass=ABCMeta): method __call__ (line 26) | def __call__(self, *args, **kwargs): method reset (line 29) | def reset(self): method destroy (line 32) | def destroy(self): FILE: deeppavlov/core/models/estimator.py class Estimator (line 21) | class Estimator(Component, Serializable): method fit (line 25) | def fit(self, *args, **kwargs): FILE: deeppavlov/core/models/nn_model.py class NNModel (line 21) | class NNModel(Component, Serializable): method train_on_batch (line 25) | def train_on_batch(self, x: list, y: list): method process_event (line 28) | def process_event(self, event_name, data): FILE: deeppavlov/core/models/serializable.py class Serializable (line 25) | class Serializable(metaclass=ABCMeta): method __init__ (line 28) | def __init__(self, save_path: Optional[Union[str, Path]], load_path: O... method save (line 52) | def save(self, *args, **kwargs): method load (line 56) | def load(self, *args, **kwargs): FILE: deeppavlov/core/models/torch_model.py class TorchModel (line 28) | class TorchModel(NNModel): method __init__ (line 58) | def __init__(self, model: torch.nn.Module, method _init_device (line 90) | def _init_device(self, device: Union[torch.device, str]) -> torch.device: method is_data_parallel (line 102) | def is_data_parallel(self) -> bool: method load (line 105) | def load(self, fname: Optional[str] = None, *args, **kwargs) -> None: method save (line 156) | def save(self, fname: Optional[str] = None, *args, **kwargs) -> None: method process_event (line 189) | def process_event(self, event_name: str, data: dict) -> None: method train_on_batch (line 214) | def train_on_batch(self, x: list, y: list): method _make_step (line 217) | def _make_step(self, loss: torch.Tensor) -> None: FILE: deeppavlov/core/trainers/fit_trainer.py class FitTrainer (line 38) | class FitTrainer: method __init__ (line 59) | def __init__(self, chainer_config: dict, *, batch_size: int = -1, method fit_chainer (line 78) | def fit_chainer(self, iterator: Union[DataFittingIterator, DataLearnin... method _load (line 115) | def _load(self) -> None: method get_chainer (line 121) | def get_chainer(self) -> Chainer: method train (line 126) | def train(self, iterator: Union[DataFittingIterator, DataLearningItera... method test (line 131) | def test(self, data: Iterable[Tuple[Collection[Any], Collection[Any]]], method evaluate (line 210) | def evaluate(self, iterator: DataLearningIterator, FILE: deeppavlov/core/trainers/nn_trainer.py class NNTrainer (line 37) | class NNTrainer(FitTrainer): method __init__ (line 95) | def __init__(self, chainer_config: dict, *, method save (line 153) | def save(self) -> None: method _is_initial_validation (line 159) | def _is_initial_validation(self): method _is_first_validation (line 162) | def _is_first_validation(self): method _validate (line 165) | def _validate(self, iterator: DataLearningIterator, method _log (line 222) | def _log(self, iterator: DataLearningIterator, method _send_event (line 259) | def _send_event(self, event_name: str, data: Optional[dict] = None) ->... method train_on_batches (line 270) | def train_on_batches(self, iterator: DataLearningIterator) -> None: method train (line 329) | def train(self, iterator: DataLearningIterator) -> None: FILE: deeppavlov/core/trainers/torch_trainer.py class TorchTrainer (line 27) | class TorchTrainer(NNTrainer): method test (line 29) | def test(self, data: Iterable[Tuple[Collection[Any], Collection[Any]]], method train_on_batches (line 39) | def train_on_batches(self, iterator: DataLearningIterator) -> None: FILE: deeppavlov/core/trainers/utils.py function parse_metrics (line 28) | def parse_metrics(metrics: Iterable[Union[str, dict]], in_y: List[str], ... function prettify_metrics (line 48) | def prettify_metrics(metrics: List[Tuple[str, float]], precision: int = ... class NumpyArrayEncoder (line 60) | class NumpyArrayEncoder(JSONEncoder): method default (line 61) | def default(self, obj): FILE: deeppavlov/dataset_iterators/basic_classification_iterator.py class BasicClassificationDatasetIterator (line 29) | class BasicClassificationDatasetIterator(DataLearningIterator): method __init__ (line 52) | def __init__(self, data: dict, method _split_data (line 102) | def _split_data(self, field_to_split: str = None, split_fields: List[s... method _merge_data (line 133) | def _merge_data(self, fields_to_merge: List[str] = None, merged_field:... FILE: deeppavlov/dataset_iterators/huggingface_dataset_iterator.py class HuggingFaceDatasetIterator (line 24) | class HuggingFaceDatasetIterator(DataLearningIterator): method preprocess (line 27) | def preprocess(self, FILE: deeppavlov/dataset_iterators/morphotagger_iterator.py class MorphoTaggerDatasetIterator (line 24) | class MorphoTaggerDatasetIterator(DataLearningIterator): method __init__ (line 36) | def __init__(self, data: Dict[str, List[Tuple[Any, Any]]], seed: int =... method split (line 41) | def split(self, *args, **kwargs) -> None: method gen_batches (line 53) | def gen_batches(self, batch_size: int, data_type: str = 'train', FILE: deeppavlov/dataset_iterators/multitask_iterator.py class MultiTaskIterator (line 32) | class MultiTaskIterator: method __init__ (line 58) | def __init__( method _get_data_size (line 134) | def _get_data_size(self, data_type): method _get_probs (line 138) | def _get_probs(self, data_type): method _extract_data_type (line 158) | def _extract_data_type(self, data_type): method _transform_before_yielding (line 165) | def _transform_before_yielding(self, x, y, batch_size): method gen_batches (line 182) | def gen_batches(self, batch_size: int, data_type: str = "train", method get_instances (line 240) | def get_instances(self, data_type: str = "train"): class SingleTaskBatchGenerator (line 275) | class SingleTaskBatchGenerator: method __init__ (line 287) | def __init__( method __iter__ (line 312) | def __iter__(self): method __next__ (line 315) | def __next__(self): FILE: deeppavlov/dataset_iterators/siamese_iterator.py class SiameseIterator (line 25) | class SiameseIterator(DataLearningIterator): method split (line 28) | def split(self, *args, len_valid=1000, len_test=1000, **kwargs) -> None: FILE: deeppavlov/dataset_iterators/sqlite_iterator.py class SQLiteDataIterator (line 29) | class SQLiteDataIterator(DataFittingIterator): method __init__ (line 51) | def __init__(self, load_path: Union[str, Path], batch_size: Optional[i... method get_doc_ids (line 74) | def get_doc_ids(self) -> List[Any]: method get_db_name (line 86) | def get_db_name(self) -> str: method map_doc2idx (line 100) | def map_doc2idx(self) -> Dict[int, Any]: method get_doc_content (line 112) | def get_doc_content(self, doc_id: Any) -> Optional[str]: method gen_batches (line 131) | def gen_batches(self, batch_size: int, shuffle: bool = None) \ method get_instances (line 162) | def get_instances(self): FILE: deeppavlov/dataset_iterators/squad_iterator.py class SquadIterator (line 26) | class SquadIterator(DataLearningIterator): method preprocess (line 41) | def preprocess(self, data: Dict[str, Any], *args, **kwargs) -> \ class MultiSquadIterator (line 74) | class MultiSquadIterator(DataLearningIterator): method __init__ (line 96) | def __init__(self, data, seed: Optional[int] = None, shuffle: bool = T... method gen_batches (line 103) | def gen_batches(self, batch_size: int, data_type: str = 'train', shuff... method get_instances (line 144) | def get_instances(self, data_type: str = 'train') -> Tuple[Tuple[Tuple... class MultiSquadRetrIterator (line 156) | class MultiSquadRetrIterator(DataLearningIterator): method __init__ (line 181) | def __init__(self, data, seed: Optional[int] = None, shuffle: bool = F... method gen_batches (line 203) | def gen_batches(self, batch_size: int, data_type: str = 'train', shuff... method get_instances (line 265) | def get_instances(self, data_type: str = 'train') -> Tuple[Tuple[Tuple... FILE: deeppavlov/dataset_iterators/typos_iterator.py class TyposDatasetIterator (line 20) | class TyposDatasetIterator(DataLearningIterator): method split (line 26) | def split(self, test_ratio: float = 0., *args, **kwargs): FILE: deeppavlov/dataset_readers/basic_classification_reader.py class BasicClassificationDatasetReader (line 29) | class BasicClassificationDatasetReader(DatasetReader): method read (line 34) | def read(self, data_path: str, url: str = None, FILE: deeppavlov/dataset_readers/boolqa_reader.py class BoolqaReader (line 26) | class BoolqaReader(DatasetReader): method read (line 47) | def read(self, method _build_data (line 81) | def _build_data(ln: str, data_path: Path) -> List[Tuple[Tuple[str, str... FILE: deeppavlov/dataset_readers/conll2003_reader.py class Conll2003DatasetReader (line 12) | class Conll2003DatasetReader(DatasetReader): method read (line 15) | def read(self, method parse_ner_file (line 60) | def parse_ner_file(self, file_name: Path): method _iob2_to_iob (line 133) | def _iob2_to_iob(tags): method _iob2_to_iobes (line 144) | def _iob2_to_iobes(tags): FILE: deeppavlov/dataset_readers/docred_reader.py class DocREDDatasetReader (line 34) | class DocREDDatasetReader(DatasetReader): method read (line 37) | def read( method split_by_absolute (line 144) | def split_by_absolute(self, all_labeled_data: List) -> Tuple[List, Lis... method split_by_relative (line 166) | def split_by_relative(self, all_labeled_data: List) -> Tuple[List, Lis... method process_docred_file (line 179) | def process_docred_file(self, data: List[Dict], neg_samples: str = Non... method construct_pos_neg_samples (line 240) | def construct_pos_neg_samples( method construct_neg_samples (line 318) | def construct_neg_samples( method generate_data_sample (line 343) | def generate_data_sample( method generate_additional_neg_samples (line 356) | def generate_additional_neg_samples(self, doc: List, forbidden_entitie... method label_to_one_hot (line 402) | def label_to_one_hot(self, labels: List[int]) -> List: method print_statistics (line 409) | def print_statistics(self, train_stat: Dict, valid_stat: Dict, test_st... FILE: deeppavlov/dataset_readers/faq_reader.py class FaqDatasetReader (line 24) | class FaqDatasetReader(DatasetReader): method read (line 27) | def read(self, data_path: str = None, data_url: str = None, x_col_name... FILE: deeppavlov/dataset_readers/huggingface_dataset_reader.py class HuggingFaceDatasetReader (line 28) | class HuggingFaceDatasetReader(DatasetReader): method read (line 32) | def read(self, function interleave_splits (line 158) | def interleave_splits(splits: List[str], percentage: int = 50) -> List[s... function preprocess_copa (line 176) | def preprocess_copa(examples: Dataset, *, lang: str = "en") -> Dict[str,... function preprocess_boolq (line 213) | def preprocess_boolq(examples: Dataset) -> Dict[str, List[str]]: function preprocess_record (line 237) | def preprocess_record(examples: Dataset, *, clean_entities: bool = True)... function add_label_names (line 332) | def add_label_names(dataset: Dataset, label_column: str, label_names: Li... function binary_downsample (line 347) | def binary_downsample(dataset: Dataset, function add_num_examples (line 425) | def add_num_examples(dataset: Dataset) -> Dict[str, List[int]]: function preprocess_multirc (line 438) | def preprocess_multirc(examples: Dataset, *, clean_paragraphs: bool = Tr... function preprocess_wsc (line 460) | def preprocess_wsc(dataset: Dataset) -> Dict[str, List[str]]: FILE: deeppavlov/dataset_readers/imdb_reader.py class ImdbReader (line 26) | class ImdbReader(DatasetReader): method read (line 36) | def read(self, data_path: str, url: Optional[str] = None, FILE: deeppavlov/dataset_readers/line_reader.py class LineReader (line 22) | class LineReader(DatasetReader): method read (line 25) | def read(self, data_path: str = None, *args, **kwargs) -> Dict: FILE: deeppavlov/dataset_readers/morphotagging_dataset_reader.py function get_language (line 30) | def get_language(filepath: str) -> str: function read_infile (line 36) | def read_infile(infile: Union[Path, str], *, from_words=False, class MorphotaggerDatasetReader (line 110) | class MorphotaggerDatasetReader(DatasetReader): method read (line 115) | def read(self, data_path: Union[List, str], FILE: deeppavlov/dataset_readers/multitask_reader.py class MultiTaskReader (line 26) | class MultiTaskReader(DatasetReader): method read (line 29) | def read(self, tasks: Dict[str, Dict[str, dict]], task_defaults: dict ... FILE: deeppavlov/dataset_readers/odqa_reader.py class ODQADataReader (line 35) | class ODQADataReader(DatasetReader): method read (line 41) | def read(self, data_path: Union[Path, str], db_url: Optional[str] = No... method iter_files (line 83) | def iter_files(self, path: Union[Path, str]) -> Generator[Path, Any, A... method _build_db (line 108) | def _build_db(self, save_path: Union[Path, str], dataset_format: str, method _get_file_contents (line 170) | def _get_file_contents(fpath: Union[Path, str]) -> List[Tuple[str, str]]: method _get_json_contents (line 186) | def _get_json_contents(fpath: Union[Path, str]) -> List[Tuple[str, str]]: method _get_wiki_contents (line 210) | def _get_wiki_contents(fpath: Union[Path, str]) -> List[Tuple[str, str]]: FILE: deeppavlov/dataset_readers/paraphraser_reader.py class ParaphraserReader (line 25) | class ParaphraserReader(DatasetReader): method read (line 31) | def read(self, method _build_data (line 51) | def _build_data(data_path: Path, do_lower_case: bool) -> List[Tuple[Tu... FILE: deeppavlov/dataset_readers/rel_ranking_reader.py class ParaphraserReader (line 25) | class ParaphraserReader(DatasetReader): method read (line 31) | def read(self, method _build_data (line 51) | def _build_data(data_path: Path, do_lower_case: bool) -> List[Tuple[Tu... FILE: deeppavlov/dataset_readers/rured_reader.py class RuREDDatasetReader (line 15) | class RuREDDatasetReader(DatasetReader): method read (line 18) | def read(self, data_path: str, rel2id: Dict = None) -> Dict[str, List[... method process_rured_file (line 70) | def process_rured_file(self, data: List[Dict], num_neg_samples: str) -... method label_to_one_hot (line 150) | def label_to_one_hot(self, label: int) -> List[int]: method add_default_rel_dict (line 157) | def add_default_rel_dict(): FILE: deeppavlov/dataset_readers/sq_reader.py class SQReader (line 26) | class SQReader(DatasetReader): method read (line 29) | def read(self, data_path: str, valid_size: int = None): class RuBQReader (line 43) | class RuBQReader(SQReader): method read (line 46) | def read(self, data_path: str, version: str = "2.0", question_types: L... method preprocess (line 62) | def preprocess(self, sample): class LCQuADReader (line 76) | class LCQuADReader(SQReader): method read (line 79) | def read(self, data_path: str, question_types: List[str] = "all", method preprocess (line 95) | def preprocess(self, sample): FILE: deeppavlov/dataset_readers/squad_dataset_reader.py class SquadDatasetReader (line 26) | class SquadDatasetReader(DatasetReader): method read (line 55) | def read(self, data_path: str, dataset: Optional[str] = 'SQuAD', url: ... class MultiSquadDatasetReader (line 106) | class MultiSquadDatasetReader(DatasetReader): method read (line 121) | def read(self, data_path: str, dataset: Optional[str] = 'MultiSQuADRet... FILE: deeppavlov/dataset_readers/typos_reader.py class TyposCustom (line 31) | class TyposCustom(DatasetReader): method __init__ (line 36) | def __init__(self): method build (line 40) | def build(data_path: str) -> Path: method read (line 52) | def read(cls, data_path: str, *args, **kwargs) -> Dict[str, List[Tuple... class TyposWikipedia (line 70) | class TyposWikipedia(TyposCustom): method build (line 77) | def build(data_path: str) -> Path: class TyposKartaslov (line 115) | class TyposKartaslov(DatasetReader): method __init__ (line 121) | def __init__(self): method build (line 125) | def build(data_path: str) -> Path: method read (line 149) | def read(data_path: str, *args, **kwargs) -> Dict[str, List[Tuple[str,... FILE: deeppavlov/dataset_readers/ubuntu_v2_reader.py class UbuntuV2Reader (line 25) | class UbuntuV2Reader(DatasetReader): method read (line 31) | def read(self, data_path: str, method preprocess_data_train (line 56) | def preprocess_data_train(self, train_fname: Union[Path, str]) -> List... method preprocess_data_validation (line 74) | def preprocess_data_validation(self, fname: Union[Path, str]) -> List[... FILE: deeppavlov/deep.py function main (line 57) | def main(): FILE: deeppavlov/download.py function get_config_downloads (line 43) | def get_config_downloads(config: Union[str, Path, dict]) -> Set[Tuple[st... function get_configs_downloads (line 66) | def get_configs_downloads(config: Optional[Union[str, Path, dict]] = Non... function check_md5 (line 80) | def check_md5(url: str, dest_paths: List[Path], headers: Optional[dict] ... function download_resource (line 129) | def download_resource(url: str, dest_paths: Iterable[Union[Path, str]], ... function download_resources (line 146) | def download_resources(args: Namespace) -> None: function deep_download (line 160) | def deep_download(config: Union[str, Path, dict]) -> None: function main (line 177) | def main(args: Optional[List[str]] = None) -> None: FILE: deeppavlov/metrics/accuracy.py function accuracy (line 29) | def accuracy(y_true: [list, np.ndarray], y_predicted: [list, np.ndarray]... function kbqa_accuracy (line 55) | def kbqa_accuracy(questions_batch, pred_answer_labels_batch, pred_answer... function multitask_accuracy (line 80) | def multitask_accuracy(*args) -> float: function multitask_sequence_accuracy (line 101) | def multitask_sequence_accuracy(*args) -> float: function multitask_token_accuracy (line 125) | def multitask_token_accuracy(*args) -> float: function sets_accuracy (line 147) | def sets_accuracy(y_true: [list, np.ndarray], y_predicted: [list, np.nda... function slots_accuracy (line 167) | def slots_accuracy(y_true, y_predicted): function per_token_accuracy (line 174) | def per_token_accuracy(y_true, y_predicted): function per_item_dialog_accuracy (line 185) | def per_item_dialog_accuracy(y_true, y_predicted: List[List[str]]): function round_accuracy (line 195) | def round_accuracy(y_true, y_predicted): FILE: deeppavlov/metrics/bleu.py function bleu_advanced (line 27) | def bleu_advanced(y_true: List[Any], y_predicted: List[Any], function bleu (line 59) | def bleu(y_true, y_predicted): function google_bleu (line 65) | def google_bleu(y_true, y_predicted): function per_item_bleu (line 71) | def per_item_bleu(y_true, y_predicted): function per_item_dialog_bleu (line 78) | def per_item_dialog_bleu(y_true, y_predicted): FILE: deeppavlov/metrics/correlation.py function pearson_correlation (line 22) | def pearson_correlation(y_true, y_predicted) -> float: function spearman_correlation (line 27) | def spearman_correlation(y_true, y_predicted) -> float: function matthews_correlation (line 32) | def matthews_correlation(y_true, y_predicted) -> float: FILE: deeppavlov/metrics/elmo_metrics.py function elmo_loss2ppl (line 23) | def elmo_loss2ppl(losses: List[np.ndarray]) -> float: FILE: deeppavlov/metrics/fmeasure.py function ner_f1 (line 29) | def ner_f1(y_true, y_predicted): function ner_token_f1 (line 53) | def ner_token_f1(y_true, y_predicted, print_results=False): function _print_conll_report (line 116) | def _print_conll_report(results, accuracy, total_true_entities, total_pr... function _global_stats_f1 (line 166) | def _global_stats_f1(results): function round_f1 (line 210) | def round_f1(y_true, y_predicted): function round_f1_macro (line 237) | def round_f1_macro(y_true, y_predicted): function round_f1_weighted (line 260) | def round_f1_weighted(y_true, y_predicted): function chunk_finder (line 282) | def chunk_finder(current_token, previous_token, tag): function precision_recall_f1 (line 310) | def precision_recall_f1(y_true, y_pred, print_results=True, short_report... function ner_f1__f1_macro__f1 (line 442) | def ner_f1__f1_macro__f1(ner_true, ner_pred, macro_true, macro_pred, f1_... function roc_auc__roc_auc__ner_f1 (line 450) | def roc_auc__roc_auc__ner_f1(true_onehot1, pred_probas1, true_onehot2, p... FILE: deeppavlov/metrics/google_bleu.py function _get_ngrams (line 28) | def _get_ngrams(segment, max_order): function compute_bleu (line 48) | def compute_bleu(reference_corpus, translation_corpus, max_order=4, FILE: deeppavlov/metrics/log_loss.py function sk_log_loss (line 25) | def sk_log_loss(y_true: Union[List[List[float]], List[List[int]], np.nda... FILE: deeppavlov/metrics/mse.py function mse (line 23) | def mse(y_true: Union[np.array, list], FILE: deeppavlov/metrics/recall_at_k.py function recall_at_k (line 23) | def recall_at_k(y_true: List[int], y_pred: List[List[np.ndarray]], k: int): function r_at_1 (line 47) | def r_at_1(y_true, y_pred): function r_at_2 (line 52) | def r_at_2(y_true, y_pred): function r_at_5 (line 57) | def r_at_5(labels, predictions): function r_at_10 (line 62) | def r_at_10(labels, predictions): FILE: deeppavlov/metrics/record_metrics.py function record_f1_score (line 13) | def record_f1_score(record_examples: List[RecordNestedExample]): function record_em_score (line 35) | def record_em_score(record_examples: List[RecordNestedExample]): function normalize_answer (line 56) | def normalize_answer(s): function string_f1_score (line 77) | def string_f1_score(prediction, ground_truth): function exact_match_score (line 93) | def exact_match_score(prediction, ground_truth): FILE: deeppavlov/metrics/roc_auc_score.py function roc_auc_score (line 25) | def roc_auc_score(y_true: Union[List[List[float]], List[List[int]], np.n... FILE: deeppavlov/metrics/squad_metrics.py function squad_v2_exact_match (line 24) | def squad_v2_exact_match(y_true: List[List[str]], y_predicted: List[str]... function squad_v1_exact_match (line 44) | def squad_v1_exact_match(y_true: List[List[str]], y_predicted: List[str]... function squad_v2_f1 (line 68) | def squad_v2_f1(y_true: List[List[str]], y_predicted: List[str]) -> float: function squad_v1_f1 (line 104) | def squad_v1_f1(y_true: List[List[str]], y_predicted: List[str]) -> float: function normalize_answer (line 139) | def normalize_answer(s: str) -> str: FILE: deeppavlov/models/api_requester/api_requester.py class ApiRequester (line 25) | class ApiRequester(Component): method __init__ (line 41) | def __init__(self, url: str, out: [int, list], param_names: [list, tup... method __call__ (line 50) | def __call__(self, *args: List[Any], **kwargs: Dict[str, Any]): method get_async_response (line 82) | async def get_async_response(self, data: dict, batch_size: int) -> Asy... FILE: deeppavlov/models/api_requester/api_router.py class ApiRouter (line 28) | class ApiRouter(Component): method __init__ (line 40) | def __init__(self, api_requesters: List[ApiRequester], n_workers: int ... method __call__ (line 44) | def __call__(self, *args): FILE: deeppavlov/models/classifiers/cos_sim_classifier.py class CosineSimilarityClassifier (line 33) | class CosineSimilarityClassifier(Estimator, Serializable): method __init__ (line 42) | def __init__(self, top_n: int = 1, save_path: str = None, load_path: s... method __call__ (line 51) | def __call__(self, q_vects: Union[csr_matrix, List]) -> Tuple[List[str... method fit (line 101) | def fit(self, x_train_vects: Tuple[Union[csr_matrix, List]], y_train: ... method save (line 126) | def save(self) -> None: method load (line 131) | def load(self) -> None: FILE: deeppavlov/models/classifiers/dnnc_proba2labels.py class Proba2Labels (line 27) | class Proba2Labels(Component): method __init__ (line 38) | def __init__(self, method __call__ (line 48) | def __call__(self, FILE: deeppavlov/models/classifiers/proba2labels.py class Proba2Labels (line 27) | class Proba2Labels(Component): method __init__ (line 44) | def __init__(self, method __call__ (line 57) | def __call__(self, FILE: deeppavlov/models/classifiers/re_bert.py class BertWithAdaThresholdLocContextPooling (line 18) | class BertWithAdaThresholdLocContextPooling(nn.Module): method __init__ (line 20) | def __init__( method forward (line 64) | def forward( method get_hrt (line 104) | def get_hrt(self, sequence_output: Tensor, attention: Tensor, entity_p... method load (line 157) | def load(self) -> None: FILE: deeppavlov/models/classifiers/torch_classification_model.py class TorchTextClassificationModel (line 30) | class TorchTextClassificationModel(TorchModel): method __init__ (line 55) | def __init__(self, n_classes: int, method __call__ (line 86) | def __call__(self, texts: List[np.ndarray], *args) -> Union[List[List[... method train_on_batch (line 115) | def train_on_batch(self, texts: List[List[np.ndarray]], labels: list) ... FILE: deeppavlov/models/classifiers/torch_nets.py class ShallowAndWideCnn (line 21) | class ShallowAndWideCnn(nn.Module): method __init__ (line 22) | def __init__(self, n_classes: int, embedding_size: int, kernel_sizes_c... method forward (line 46) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: deeppavlov/models/classifiers/utils.py function labels2onehot (line 24) | def labels2onehot(labels: [List[str], List[List[str]], np.ndarray], clas... function proba2labels (line 52) | def proba2labels(proba: [list, np.ndarray], confidence_threshold: float,... function proba2onehot (line 77) | def proba2onehot(proba: [list, np.ndarray], confidence_threshold: float,... FILE: deeppavlov/models/doc_retrieval/bpr.py class FaissBinaryIndex (line 28) | class FaissBinaryIndex: method __init__ (line 29) | def __init__(self, index: faiss.Index): method search (line 32) | def search(self, query_embs: np.ndarray, k: int, binary_k=1000, rerank... class BPR (line 56) | class BPR(Component, Serializable): method __init__ (line 57) | def __init__(self, pretrained_model: str, method load (line 77) | def load(self): method save (line 82) | def save(self) -> None: method encode_queries (line 85) | def encode_queries(self, queries, batch_size: int = 256) -> np.ndarray: method __call__ (line 102) | def __call__(self, queries): FILE: deeppavlov/models/doc_retrieval/logit_ranker.py class LogitRanker (line 28) | class LogitRanker(Component): method __init__ (line 45) | def __init__(self, squad_model: Union[Chainer, Component], batch_size:... method __call__ (line 53) | def __call__(self, contexts_batch: List[List[str]], questions_batch: L... FILE: deeppavlov/models/doc_retrieval/pop_ranker.py class PopRanker (line 31) | class PopRanker(Component): method __init__ (line 57) | def __init__(self, pop_dict_path: str, load_path: str, top_n: int = 3,... method __call__ (line 69) | def __call__(self, input_doc_ids: List[List[Any]], input_doc_scores: L... FILE: deeppavlov/models/doc_retrieval/tfidf_ranker.py class TfidfRanker (line 28) | class TfidfRanker(Component): method __init__ (line 46) | def __init__(self, vectorizer: HashingTfIdfVectorizer, top_n=5, active... method __call__ (line 52) | def __call__(self, questions: List[str]) -> Tuple[List[Any], List[floa... FILE: deeppavlov/models/doc_retrieval/utils.py function concat_lists (line 23) | def concat_lists(list_a: List[List[Any]], list_b: List[List[Any]]): function find_answer_sentence (line 30) | def find_answer_sentence(answer_pos: int, context: str) -> str: FILE: deeppavlov/models/embedders/abstract_embedder.py class Embedder (line 29) | class Embedder(Component, Serializable, metaclass=ABCMeta): method __init__ (line 46) | def __init__(self, load_path: Union[str, Path], pad_zero: bool = False... method save (line 58) | def save(self) -> None: method __call__ (line 64) | def __call__(self, batch: List[List[str]], mean: bool = None) -> List[... method __iter__ (line 81) | def __iter__(self) -> Iterator[str]: method _get_word_vector (line 90) | def _get_word_vector(self, w: str) -> np.ndarray: method _encode (line 101) | def _encode(self, tokens: List[str], mean: bool) -> Union[List[np.ndar... FILE: deeppavlov/models/embedders/fasttext_embedder.py class FasttextEmbedder (line 29) | class FasttextEmbedder(Embedder): method _get_word_vector (line 45) | def _get_word_vector(self, w: str) -> np.ndarray: method load (line 48) | def load(self) -> None: method __iter__ (line 56) | def __iter__(self) -> Iterator[str]: FILE: deeppavlov/models/embedders/tfidf_weighted_embedder.py class TfidfWeightedEmbedder (line 30) | class TfidfWeightedEmbedder(Component): method __init__ (line 78) | def __init__(self, method load_tags_vocab (line 118) | def load_tags_vocab(load_path: str) -> dict: method load_counter_vocab (line 141) | def load_counter_vocab(load_path: str) -> Tuple[dict, int]: method space_detokenizer (line 167) | def space_detokenizer(batch: List[List[str]]) -> List[str]: method __call__ (line 179) | def __call__(self, batch: List[List[str]], tags_batch: Optional[List[L... method _encode (line 210) | def _encode(self, tokens: List[str], mean: bool) -> Union[List[np.ndar... method get_weight (line 247) | def get_weight(self, count: int) -> float: method _tags_encode (line 262) | def _tags_encode(self, tokens: List[str], tags: List[str], mean: bool)... FILE: deeppavlov/models/embedders/transformers_embedder.py class TransformersBertEmbedder (line 26) | class TransformersBertEmbedder(Serializable): method __init__ (line 38) | def __init__(self, load_path: Union[str, Path], bert_config_path: Unio... method save (line 48) | def save(self, *args, **kwargs): method load (line 51) | def load(self): method __call__ (line 55) | def __call__(self, FILE: deeppavlov/models/entity_extraction/entity_detection_parser.py class QuestionSignChecker (line 33) | class QuestionSignChecker: method __init__ (line 34) | def __init__(self, delete_brackets: bool = False, **kwargs): method __call__ (line 38) | def __call__(self, questions: List[str]) -> List[str]: function entity_type_split (line 54) | def entity_type_split(entities_batch: List[List[str]], tags_batch: List[... class EntityDetectionParser (line 72) | class EntityDetectionParser(Component): method __init__ (line 75) | def __init__(self, o_tag: str, tags_file: str, entity_tags: List[str] ... method __call__ (line 118) | def __call__(self, question_tokens_batch: List[List[str]], tokens_info... method tags_from_probas (line 146) | def tags_from_probas(self, tokens: List[str], probas: np.array) -> Tup... method correct_tags (line 168) | def correct_tags(self, tokens: List[str], tags: List[str]) -> List[str]: method correct_quotes (line 194) | def correct_quotes(self, tokens: List[str], tags: List[str], probas: n... method add_entity (line 226) | def add_entity(self, entity: str, c_tag: str) -> None: method entities_from_tags (line 246) | def entities_from_tags(self, tokens: List[str], tags: List[str], FILE: deeppavlov/models/entity_extraction/entity_linking.py class EntityLinker (line 38) | class EntityLinker(Component, Serializable): method __init__ (line 43) | def __init__( method load (line 130) | def load(self) -> None: method save (line 137) | def save(self) -> None: method __call__ (line 140) | def __call__( method link_entities (line 198) | def link_entities( method define_all_low_conf (line 337) | def define_all_low_conf(self, cand_ent_init, thres): method correct_tags (line 349) | def correct_tags(self, tags): method unite_dicts (line 361) | def unite_dicts(self, cand_ent_init, new_cand_ent_init): method process_cand_ent (line 370) | def process_cand_ent(self, cand_ent_init, entities_and_ids, substr_spl... method sanitize_substr (line 377) | def sanitize_substr(self, entity_substr, tag): method find_exact_match (line 384) | def find_exact_match(self, entity_substr, tags, use_tags=True): method find_fuzzy_match (line 402) | def find_fuzzy_match(self, entity_substr_split, tags, use_tags=True): method match_tokens (line 422) | def match_tokens(self, entity_substr_split, label_tokens): method correct_substr_score (line 452) | def correct_substr_score(self, entity_substr_split, label_tokens, subs... method calc_substr_score (line 477) | def calc_substr_score(self, entity_title, entity_substr_split, tag, en... method rank_by_description (line 503) | def rank_by_description( method sort_out_low_conf (line 671) | def sort_out_low_conf(self, entity_substr, top_entities, top_conf): method rank_by_connections (line 683) | def rank_by_connections(self, ids_list): FILE: deeppavlov/models/entity_extraction/find_word.py class WordSearcher (line 27) | class WordSearcher: method __init__ (line 28) | def __init__(self, words_dict_filename: str, ngrams_matrix_filename: s... method load (line 41) | def load(self): method make_ngrams_dicts (line 50) | def make_ngrams_dicts(self): method __call__ (line 61) | def __call__(self, query, tags): FILE: deeppavlov/models/entity_extraction/ner_chunker.py class NerChunker (line 32) | class NerChunker(Component): method __init__ (line 38) | def __init__(self, vocab_file: str, max_seq_len: int = 400, lowercase:... method __call__ (line 55) | def __call__(self, docs_batch: List[str]) -> Tuple[List[List[str]], Li... method sanitize (line 165) | def sanitize(self, text): class NerChunkModel (line 183) | class NerChunkModel(Component): method __init__ (line 188) | def __init__(self, ner: Chainer, method __call__ (line 207) | def __call__(self, text_batch_list: List[List[str]], method merge_annotations (line 336) | def merge_annotations(self, substr_batch, pos_batch, probas_batch, sub... FILE: deeppavlov/models/kbqa/query_generator.py class QueryGenerator (line 37) | class QueryGenerator(QueryGeneratorBase): method __init__ (line 42) | def __init__(self, wiki_parser: WikiParser, method __call__ (line 79) | def __call__(self, question_batch: List[str], method parse_queries_info (line 121) | def parse_queries_info(self, question, queries_info, entity_ids, type_... method check_valid_query (line 229) | def check_valid_query(self, entities_rel_conn, query_hdt_seq): method query_parser (line 249) | def query_parser(self, question: str, method parse_outputs (line 316) | def parse_outputs(self, outputs_list, combs_list, query_info_list, ent... class QueryFormatter (line 370) | class QueryFormatter(Component): method __init__ (line 371) | def __init__(self, query_info: Dict[str, str], replace_prefixes: Dict[... method __call__ (line 375) | def __call__(self, queries_batch): FILE: deeppavlov/models/kbqa/query_generator_base.py class QueryGeneratorBase (line 35) | class QueryGeneratorBase(Component, Serializable): method __init__ (line 41) | def __init__(self, template_matcher: TemplateMatcher, method load (line 96) | def load(self) -> None: method save (line 103) | def save(self) -> None: method find_candidate_answers (line 106) | def find_candidate_answers(self, question: str, method get_entity_ids (line 162) | def get_entity_ids(self, entities: List[str], tags: List[str], probas:... method sparql_template_parser (line 183) | def sparql_template_parser(self, question: str, method find_top_rels (line 241) | def find_top_rels(self, question: str, entity_ids: List[List[str]], tr... method find_answer_wikihow (line 292) | def find_answer_wikihow(self, howto_sentence: str) -> str: method query_parser (line 306) | def query_parser(self, question, query_templates, entity_ids, type_ids... FILE: deeppavlov/models/kbqa/rel_ranking_infer.py class RelRankerInfer (line 32) | class RelRankerInfer(Component, Serializable): method __init__ (line 35) | def __init__(self, load_path: str, method load (line 90) | def load(self) -> None: method save (line 96) | def save(self) -> None: method __call__ (line 99) | def __call__(self, questions_batch: List[str], method preprocess_ranking_input (line 222) | def preprocess_ranking_input(self, question, answers): method rank_rels (line 256) | def rank_rels(self, question: str, candidate_rels: List[str]) -> List[... FILE: deeppavlov/models/kbqa/ru_adj_to_noun.py class RuAdjToNoun (line 31) | class RuAdjToNoun: method __init__ (line 37) | def __init__(self, freq_dict_filename: str, candidate_nouns: int = 10,... method search (line 66) | def search(self, word: str): method make_sparse_matrix (line 82) | def make_sparse_matrix(self, words: List[str]): FILE: deeppavlov/models/kbqa/sentence_answer.py function find_tokens (line 38) | def find_tokens(tokens, node, not_inc_node): function find_inflect_dict (line 46) | def find_inflect_dict(sent_nodes): function find_wh_node (line 60) | def find_wh_node(sent_nodes): function find_tokens_to_replace (line 77) | def find_tokens_to_replace(wh_node_head, main_head, question_tokens, que... function sentence_answer (line 124) | def sentence_answer(question, entity_title, entities=None, template_answ... FILE: deeppavlov/models/kbqa/template_matcher.py class RegexpMatcher (line 28) | class RegexpMatcher: method __init__ (line 29) | def __init__(self, question): method __call__ (line 32) | def __call__(self, template): class TemplateMatcher (line 41) | class TemplateMatcher(Serializable): method __init__ (line 48) | def __init__(self, load_path: str, templates_filename: str, method load (line 63) | def load(self) -> None: method save (line 68) | def save(self) -> None: method __call__ (line 71) | def __call__(self, question: str, entities_from_ner: List[str]) -> \ method sanitize (line 124) | def sanitize(self, question: str) -> str: method match_template_and_ner (line 132) | def match_template_and_ner(self, entities_cand: List[str], entities_fr... FILE: deeppavlov/models/kbqa/tree_to_sparql.py class SlovnetSyntaxParser (line 41) | class SlovnetSyntaxParser(Component, Serializable): method __init__ (line 44) | def __init__(self, load_path: str, navec_filename: str, syntax_parser_... method load (line 58) | def load(self) -> None: method save (line 63) | def save(self) -> None: method preprocess_sentences (line 66) | def preprocess_sentences(self, sentences, entity_offsets_batch): method get_markup (line 126) | def get_markup(self, proc_syntax_batch, replace_dict_batch): method find_cycle (line 193) | def find_cycle(self, ids, head_ids): method correct_markup (line 200) | def correct_markup(self, words, head_ids, rels, root_n): method find_root (line 221) | def find_root(self, rels): method get_elements (line 229) | def get_elements(self, markup_elem): method correct_cycle (line 238) | def correct_cycle(self, ids, head_ids, rels, markup_elem): method process_markup (line 249) | def process_markup(self, markup_batch): method __call__ (line 287) | def __call__(self, sentences, entity_offsets_batch): class TreeToSparql (line 296) | class TreeToSparql(Component): method __init__ (line 301) | def __init__(self, sparql_queries_filename: str, syntax_parser: Compon... method __call__ (line 330) | def __call__(self, questions_batch: List[str], substr_batch: List[List... method sort_substr (line 463) | def sort_substr(self, substr_batch: List[List[str]], tags_batch: List[... method syntax_parse (line 480) | def syntax_parse(self, question: str, entity_offsets_list: List[List[i... method sanitize_question (line 496) | def sanitize_question(self, tree: Node, root: Node, appos_token_nums: ... method find_root (line 510) | def find_root(self, tree: Node) -> Node: method find_branch_with_unknown (line 515) | def find_branch_with_unknown(self, root: Node) -> Tuple[str, str]: method find_modifiers_of_unknown (line 545) | def find_modifiers_of_unknown(self, node: Node) -> Tuple[List[Union[st... method find_clause_node (line 561) | def find_clause_node(self, root: Node, unknown_branch: Node) -> Tuple[... method find_entities (line 569) | def find_entities(self, node: Node, positions: List[List[int]]) -> Lis... method find_year_or_number (line 590) | def find_year_or_number(self, node: Node) -> bool: method find_year_constraint (line 597) | def find_year_constraint(self, node: Node) -> list: method find_appos_tokens (line 609) | def find_appos_tokens(self, node: Node, tok_and_ord: List[Tuple[Node, ... method find_clause_tokens (line 623) | def find_clause_tokens(self, node: Node, tok_and_ord: Dict[int, Node],... method find_first_last (line 634) | def find_first_last(self, node: Node) -> str: method find_ranking_tokens (line 651) | def find_ranking_tokens(self, node: Node, appos_token_nums: List[int],... method choose_grounded_entity (line 662) | def choose_grounded_entity(grounded_entities: List[str], entities_dict... method build_query (line 676) | def build_query(self, root: Node, unknown_branch: Node, root_desc: Dic... FILE: deeppavlov/models/kbqa/type_define.py class AnswerTypesExtractor (line 26) | class AnswerTypesExtractor: method __init__ (line 29) | def __init__(self, lang: str, types_filename: str, types_sets_filename... method __call__ (line 58) | def __call__(self, questions_batch: List[str], entity_substr_batch: Li... FILE: deeppavlov/models/kbqa/utils.py function find_query_features (line 21) | def find_query_features(query, qualifier_rels=None, question=None, order... function extract_year (line 38) | def extract_year(question_tokens: List[str], question: str) -> str: function extract_number (line 61) | def extract_number(question_tokens: List[str], question: str) -> str: function order_of_answers_sorting (line 78) | def order_of_answers_sorting(question: str) -> str: function make_combs (line 88) | def make_combs(entity_ids: List[List[str]], permut: bool) -> List[List[s... function fill_slots (line 105) | def fill_slots(query: str, entity_comb: List[str], type_comb: List[str],... function correct_variables (line 119) | def correct_variables(query_triplets: List[str], answer_ent: List[str], ... function query_from_triplets (line 136) | def query_from_triplets(query_triplets: List[str], answer_ent: List[str]... function fill_query (line 147) | def fill_query(query: List[str], entity_comb: List[str], type_comb: List... function make_sparql_query (line 172) | def make_sparql_query(query_info: Tuple[List[str], List[str], List[str],... function merge_sparql_query (line 187) | def merge_sparql_query(query_info: Tuple[List[str], List[str], Dict[str,... function preprocess_template_queries (line 194) | def preprocess_template_queries(template_queries: Dict[str, Any], kb_pre... FILE: deeppavlov/models/kbqa/wiki_parser.py class WikiParser (line 31) | class WikiParser: method __init__ (line 34) | def __init__(self, wiki_filename: str, method __call__ (line 88) | def __call__(self, parser_info_list: List[str], queries_list: List[Any... method execute_queries_list (line 92) | def execute_queries_list(self, parser_info_list: List[str], queries_li... method execute (line 201) | def execute(self, what_return: List[str], method define_is_boolean (line 342) | def define_is_boolean(query_hdt_seq): method merge_combs (line 346) | def merge_combs(comb1, comb2): method search (line 356) | def search(self, query: List[str], unknown_elem_positions: List[Tuple[... method find_label (line 396) | def find_label(self, entity: str, question: str = "") -> str: method format_date (line 458) | def format_date(self, entity, question): method find_alias (line 484) | def find_alias(self, entity: str) -> List[str]: method find_rels (line 491) | def find_rels(self, entity: str, direction: str, rel_type: str = "no_t... method find_rels_2hop (line 513) | def find_rels_2hop(self, entity_ids, rels_1hop): method find_object (line 537) | def find_object(self, entity: str, rel: str, direction: str) -> List[s... method check_triplet (line 561) | def check_triplet(self, subj: str, rel: str, obj: str) -> bool: method find_types (line 584) | def find_types(self, entity: str): method find_subclasses (line 605) | def find_subclasses(self, entity: str): method uncompress (line 622) | def uncompress(self, triplets: Union[str, List[List[str]]]) -> List[Li... method parse_triplets (line 628) | def parse_triplets(self, entity): method find_triplets (line 639) | def find_triplets(self, subj: str, direction: str) -> Tuple[str, List[... method fill_triplets (line 648) | def fill_triplets(self, init_triplets, what_to_return, comb): FILE: deeppavlov/models/morpho_syntax_parser/dependency_decoding.py class ChuLiuEdmonds (line 25) | class ChuLiuEdmonds(Component): method __init__ (line 30) | def __init__(self, min_edge_prob=1e-6, **kwargs): method __call__ (line 33) | def __call__(self, probs: List[np.ndarray]) -> List[List[int]]: FILE: deeppavlov/models/morpho_syntax_parser/joint.py class JointTaggerParser (line 25) | class JointTaggerParser(Component): method __init__ (line 39) | def __init__(self, tagger: Chainer, parser: Chainer, method __call__ (line 49) | def __call__(self, data: Union[List[str], List[List[str]]]) \ FILE: deeppavlov/models/morpho_syntax_parser/spacy_lemmatizer.py class SpacyLemmatizer (line 24) | class SpacyLemmatizer(Component): method __init__ (line 25) | def __init__(self, model: str, **kwargs): method __call__ (line 28) | def __call__(self, words_batch: List[List[str]]): FILE: deeppavlov/models/morpho_syntax_parser/syntax_parsing.py function make_pos_and_tag (line 21) | def make_pos_and_tag(tag: str, sep: str = ",", class OutputPrettifier (line 46) | class OutputPrettifier(Component): method __init__ (line 49) | def __init__(self, return_string: bool = True, begin: str = "", end: s... method prettify (line 56) | def prettify(self, tokens: List[str], heads: List[int], deps: List[str... method __call__ (line 59) | def __call__(self, X: List[List[str]], Y: List[List[int]], Z: List[Lis... class DependencyOutputPrettifier (line 72) | class DependencyOutputPrettifier(OutputPrettifier): method __init__ (line 81) | def __init__(self, return_string: bool = True, begin: str = "", end: s... method prettify (line 86) | def prettify(self, tokens: List[str], heads: List[int], deps: List[str... class LemmatizedOutputPrettifier (line 104) | class LemmatizedOutputPrettifier(OutputPrettifier): method __init__ (line 120) | def __init__(self, return_string: bool = True, begin: str = "", end: s... method prettify (line 125) | def prettify(self, tokens: List[str], tags: List[str], lemmas: List[st... FILE: deeppavlov/models/preprocessors/dirty_comments_preprocessor.py class DirtyCommentsPreprocessor (line 24) | class DirtyCommentsPreprocessor(Component): method __init__ (line 29) | def __init__(self, remove_punctuation: bool = True, *args, **kwargs): method __call__ (line 32) | def __call__(self, batch: List[str], **kwargs) -> List[str]: FILE: deeppavlov/models/preprocessors/dnnc_preprocessor.py class PairGenerator (line 27) | class PairGenerator(Component): method __init__ (line 35) | def __init__(self, bidirectional: bool = False, **kwargs) -> None: method __call__ (line 38) | def __call__(self, FILE: deeppavlov/models/preprocessors/mask.py class Mask (line 22) | class Mask(Component): method __init__ (line 24) | def __init__(self, *args, **kwargs): method __call__ (line 28) | def __call__(tokens_batch, **kwargs): FILE: deeppavlov/models/preprocessors/multitask_preprocessor.py class MultiTaskPipelinePreprocessor (line 12) | class MultiTaskPipelinePreprocessor(Component): method __init__ (line 30) | def __init__(self, method split (line 57) | def split(self, features): method __call__ (line 81) | def __call__(self, *args): FILE: deeppavlov/models/preprocessors/ner_preprocessor.py class NerVocab (line 15) | class NerVocab(Estimator): method __init__ (line 25) | def __init__(self, method load_from_file (line 44) | def load_from_file(self, filename): method save_to_file (line 54) | def save_to_file(self, filename): method fit (line 65) | def fit(self, sents: [List[List[str]]], *args): method pad_batch (line 80) | def pad_batch(self, tokens: List[List[int]]): method __call__ (line 109) | def __call__(self, sents, **kwargs): method load (line 119) | def load(self, *args, **kwargs): method save (line 124) | def save(self, *args, **kwargs): method len (line 135) | def len(self): method t2i (line 139) | def t2i(self): method i2t (line 143) | def i2t(self): FILE: deeppavlov/models/preprocessors/odqa_preprocessors.py class DocumentChunker (line 28) | class DocumentChunker(Component): method __init__ (line 46) | def __init__(self, sentencize_fn: Callable = sent_tokenize, keep_sente... method __call__ (line 56) | def __call__(self, batch_docs: List[Union[str, List[str]]], class StringMultiplier (line 138) | class StringMultiplier(Component): method __init__ (line 144) | def __init__(self, **kwargs): method __call__ (line 147) | def __call__(self, batch_s: List[str], ref: List[str]) -> List[List[st... FILE: deeppavlov/models/preprocessors/one_hotter.py class OneHotter (line 26) | class OneHotter(Component): method __init__ (line 37) | def __init__(self, depth: int, pad_zeros: bool = False, method __call__ (line 45) | def __call__(self, batch: List[List[int]], **kwargs) -> Union[List[Lis... method _to_one_hot (line 78) | def _to_one_hot(x, n): FILE: deeppavlov/models/preprocessors/re_preprocessor.py class REPreprocessor (line 30) | class REPreprocessor(Component): method __init__ (line 31) | def __init__( method __call__ (line 66) | def __call__( method encode_ner_tag (line 194) | def encode_ner_tag(self, ner_tags: List) -> List: class REPostprocessor (line 205) | class REPostprocessor: method __init__ (line 207) | def __init__(self, rel2id_path: str, rel2label_path: str, **kwargs): method __call__ (line 214) | def __call__(self, model_output: List, nf_samples: List) -> Tuple[List... FILE: deeppavlov/models/preprocessors/response_base_loader.py class ResponseBaseLoader (line 27) | class ResponseBaseLoader(Serializable): method __init__ (line 30) | def __init__(self, *args, **kwargs): method load (line 38) | def load(self): method save (line 63) | def save(self): FILE: deeppavlov/models/preprocessors/sanitizer.py class Sanitizer (line 24) | class Sanitizer(Component): method __init__ (line 33) | def __init__(self, method filter_diacritical (line 42) | def filter_diacritical(self, tokens_batch): method replace_nums (line 53) | def replace_nums(self, tokens_batch): method __call__ (line 59) | def __call__(self, tokens_batch, **kwargs): FILE: deeppavlov/models/preprocessors/sentseg_preprocessor.py function SentSegRestoreSent (line 7) | def SentSegRestoreSent(batch_words: List[List[str]], batch_tags: List[Li... FILE: deeppavlov/models/preprocessors/squad_preprocessor.py class SquadBertMappingPreprocessor (line 27) | class SquadBertMappingPreprocessor(Component): method __init__ (line 33) | def __init__(self, do_lower_case: bool = True, *args, **kwargs): method __call__ (line 36) | def __call__(self, contexts_batch, bert_features_batch, subtokens_batc... class SquadBertAnsPreprocessor (line 71) | class SquadBertAnsPreprocessor(Component): method __init__ (line 77) | def __init__(self, do_lower_case: bool = True, *args, **kwargs): method __call__ (line 80) | def __call__(self, answers_raw, answers_start, char2subtoks, **kwargs): class SquadBertAnsPostprocessor (line 104) | class SquadBertAnsPostprocessor(Component): method __init__ (line 107) | def __init__(self, *args, **kwargs): method __call__ (line 110) | def __call__(self, answers_start_batch, answers_end_batch, contexts_ba... method get_char_position (line 138) | def get_char_position(sub2c, sub_pos): FILE: deeppavlov/models/preprocessors/str_lower.py function str_lower (line 21) | def str_lower(batch: Union[str, list, tuple]): FILE: deeppavlov/models/preprocessors/str_token_reverser.py class StrTokenReverser (line 24) | class StrTokenReverser(Component): method __init__ (line 31) | def __init__(self, tokenized: bool = False, *args, **kwargs) -> None: method _reverse_str (line 35) | def _reverse_str(raw_string): method _reverse_tokens (line 42) | def _reverse_tokens(raw_tokens): method __call__ (line 46) | def __call__(self, batch: Union[str, list, tuple]) -> StrTokenReverser... FILE: deeppavlov/models/preprocessors/str_utf8_encoder.py class StrUTF8Encoder (line 34) | class StrUTF8Encoder(Estimator): method __init__ (line 47) | def __init__(self, method __call__ (line 115) | def __call__(self, batch: Union[List[str], Tuple[str]]) -> StrUTF8Enco... method load (line 132) | def load(self) -> None: method save (line 145) | def save(self) -> None: method fit (line 151) | def fit(self, *args) -> None: method _convert_word_to_char_ids (line 159) | def _convert_word_to_char_ids(self, word): method _word_to_char_ids (line 185) | def _word_to_char_ids(self, word): method _encode_chars (line 191) | def _encode_chars(self, sentence): method _wrap_in_s_char (line 199) | def _wrap_in_s_char(self, chars_ids): method __len__ (line 207) | def __len__(self): method len (line 211) | def len(self): FILE: deeppavlov/models/preprocessors/torch_transformers_preprocessor.py class TorchTransformersMultiplechoicePreprocessor (line 40) | class TorchTransformersMultiplechoicePreprocessor(Component): method __init__ (line 54) | def __init__(self, method tokenize_mc_examples (line 66) | def tokenize_mc_examples(self, method __call__ (line 96) | def __call__(self, texts_a: List[List[str]], texts_b: List[List[str]] ... class TorchTransformersPreprocessor (line 116) | class TorchTransformersPreprocessor(Component): method __init__ (line 131) | def __init__(self, method __call__ (line 139) | def __call__(self, texts_a: List, texts_b: Optional[List[str]] = None)... class TorchTransformersEntityRankerPreprocessor (line 174) | class TorchTransformersEntityRankerPreprocessor(Component): method __init__ (line 186) | def __init__(self, method __call__ (line 208) | def __call__(self, texts_a: List[str]) -> Tuple[Any, List[int]]: class TorchSquadTransformersPreprocessor (line 257) | class TorchSquadTransformersPreprocessor(Component): method __init__ (line 271) | def __init__(self, method __call__ (line 286) | def __call__(self, question_batch: List[str], context_batch: Optional[... class RelRankingPreprocessor (line 360) | class RelRankingPreprocessor(Component): method __init__ (line 369) | def __init__(self, method __call__ (line 377) | def __call__(self, questions_batch: List[List[str]], rels_batch: List[... class PathRankingPreprocessor (line 417) | class PathRankingPreprocessor(Component): method __init__ (line 418) | def __init__(self, method __call__ (line 430) | def __call__(self, questions_batch: List[str], rels_batch: List[List[L... class TorchTransformersNerPreprocessor (line 478) | class TorchTransformersNerPreprocessor(Component): method __init__ (line 503) | def __init__(self, method __call__ (line 528) | def __call__(self, method _ner_bert_tokenize (line 619) | def _ner_bert_tokenize(tokens: List[str], class TorchBertRankerPreprocessor (line 656) | class TorchBertRankerPreprocessor(TorchTransformersPreprocessor): method __call__ (line 662) | def __call__(self, batch: List[List[str]]) -> List[List[InputFeatures]]: class RecordFlatExample (line 709) | class RecordFlatExample: class RecordNestedExample (line 720) | class RecordNestedExample: class TorchRecordPostprocessor (line 730) | class TorchRecordPostprocessor: method __init__ (line 741) | def __init__(self, is_binary: bool = False, *args, **kwargs): method __call__ (line 746) | def __call__(self, method reset_accumulator (line 788) | def reset_accumulator(self): class RecordExampleAccumulator (line 794) | class RecordExampleAccumulator: method __init__ (line 807) | def __init__(self): method add_flat_example (line 816) | def add_flat_example(self, index: str, label: int, probability: float,... method ready_to_nest (line 831) | def ready_to_nest(self, index: str) -> bool: method collect_nested_example (line 840) | def collect_nested_example(self, index: str): method return_examples (line 866) | def return_examples(self) -> List[RecordNestedExample]: method get_expected_len (line 882) | def get_expected_len(index: str) -> int: FILE: deeppavlov/models/preprocessors/transformers_preprocessor.py function _pad (line 27) | def _pad(data: List[List[Union[int, float]]], value: Union[int, float] =... class TransformersBertPreprocessor (line 36) | class TransformersBertPreprocessor(Component): method __init__ (line 37) | def __init__(self, vocab_file: str, method __call__ (line 47) | def __call__(self, tokens_batch: Union[List[str], List[List[str]]]) ->\ FILE: deeppavlov/models/ranking/metrics.py function rank_response (line 21) | def rank_response(y_true, y_pred): function r_at_1_insQA (line 35) | def r_at_1_insQA(y_true, y_pred): function recall_at_k_insQA (line 39) | def recall_at_k_insQA(y_true, y_pred, k): FILE: deeppavlov/models/relation_extraction/losses.py class ATLoss (line 11) | class ATLoss(nn.Module): method __init__ (line 12) | def __init__(self): method forward (line 15) | def forward(self, logits: Tensor, labels: Tensor) -> float: method get_label (line 43) | def get_label(self, logits: Tensor, num_labels: int = -1, threshold: f... FILE: deeppavlov/models/relation_extraction/relation_extraction_bert.py class REBertModel (line 16) | class REBertModel(TorchModel): method __init__ (line 18) | def __init__( method train_on_batch (line 53) | def train_on_batch( method __call__ (line 80) | def __call__( FILE: deeppavlov/models/sklearn/sklearn_component.py class SklearnComponent (line 34) | class SklearnComponent(Estimator): method __init__ (line 64) | def __init__(self, model_class: str, method fit (line 86) | def fit(self, *args) -> None: method __call__ (line 121) | def __call__(self, *args): method init_from_scratch (line 159) | def init_from_scratch(self) -> None: method load (line 185) | def load(self, fname: str = None) -> None: method save (line 224) | def save(self, fname: str = None) -> None: method compose_input_data (line 247) | def compose_input_data(x: List[Union[Tuple[Union[np.ndarray, list, spm... method get_function_params (line 287) | def get_function_params(f: Callable) -> List[str]: method get_class_attributes (line 300) | def get_class_attributes(cls: type) -> List[str]: FILE: deeppavlov/models/spelling_correction/brillmoore/error_model.py class ErrorModel (line 34) | class ErrorModel(Estimator): method __init__ (line 50) | def __init__(self, dictionary: StaticDictionary, window: int = 1, cand... method _find_candidates_window_0 (line 70) | def _find_candidates_window_0(self, word, prop_threshold=1e-6): method _find_candidates_window_n (line 99) | def _find_candidates_window_n(self, word, prop_threshold=1e-6): method _infer_instance (line 134) | def _infer_instance(self, instance: List[str]) -> List[List[Tuple[floa... method __call__ (line 147) | def __call__(self, data: Iterable[Iterable[str]], *args, **kwargs) -> ... method _distance_edits (line 162) | def _distance_edits(seq1, seq2): method fit (line 182) | def fit(self, x: List[str], y: List[str]): method save (line 219) | def save(self): method load (line 230) | def load(self): FILE: deeppavlov/models/spelling_correction/electors/kenlm_elector.py class KenlmElector (line 29) | class KenlmElector(Component): method __init__ (line 41) | def __init__(self, load_path: Path, beam_size: int = 4, *args, **kwargs): method __call__ (line 45) | def __call__(self, batch: List[List[List[Tuple[float, str]]]]) -> List... method _infer_instance (line 56) | def _infer_instance(self, candidates: List[List[Tuple[float, str]]]): FILE: deeppavlov/models/spelling_correction/electors/top1_elector.py class TopOneElector (line 25) | class TopOneElector(Component): method __init__ (line 30) | def __init__(self, *args, **kwargs): method __call__ (line 33) | def __call__(self, batch: List[List[List[Tuple[float, str]]]]) -> List... FILE: deeppavlov/models/spelling_correction/levenshtein/levenshtein_searcher.py class LevenshteinSearcher (line 24) | class LevenshteinSearcher: method __init__ (line 31) | def __init__(self, alphabet, dictionary, operation_costs=None, method __contains__ (line 56) | def __contains__(self, word): method search (line 59) | def search(self, word, d, allow_spaces=True, return_cost=True): method _trie_search (line 70) | def _trie_search(self, word, d, transducer=None, method _precompute_euristics (line 138) | def _precompute_euristics(self): method _define_h_function (line 173) | def _define_h_function(self): method _euristic_h_function (line 179) | def _euristic_h_function(self, suffix, index): method _minimal_replacement_cost (line 216) | def _minimal_replacement_cost(self, first, second): function _precompute_absense_costs (line 229) | def _precompute_absense_costs(dictionary, removal_costs, insertion_costs... class SegmentTransducer (line 287) | class SegmentTransducer: method __init__ (line 307) | def __init__(self, alphabet, operation_costs=None, allow_spaces=False): method get_operation_cost (line 324) | def get_operation_cost(self, up, low): method inverse (line 346) | def inverse(self): method distance (line 360) | def distance(self, first, second, return_transduction=False): method transduce (line 405) | def transduce(self, first, second, threshold): method lower_transductions (line 425) | def lower_transductions(self, word, max_cost, return_cost=True): method lower (line 457) | def lower(self, word, max_cost, return_cost=True): method upper (line 471) | def upper(self, word, max_cost, return_cost=True): method upper_transductions (line 475) | def upper_transductions(self, word, max_cost, return_cost=True): method _fill_levenshtein_table (line 479) | def _fill_levenshtein_table(self, first, second, update_func, add_pred... method _make_reversed_operation_costs (line 561) | def _make_reversed_operation_costs(self): method _make_maximal_key_lengths (line 574) | def _make_maximal_key_lengths(self): method _backtraces_to_transductions (line 595) | def _backtraces_to_transductions(self, first, second, backtraces, thre... method _perform_insertions (line 641) | def _perform_insertions(self, initial, max_cost): method _make_default_operation_costs (line 671) | def _make_default_operation_costs(self, allow_spaces=False): FILE: deeppavlov/models/spelling_correction/levenshtein/searcher_component.py class LevenshteinSearcherComponent (line 27) | class LevenshteinSearcherComponent(Component): method __init__ (line 45) | def __init__(self, words: Iterable[str], max_distance: int = 1, error_... method _infer_instance (line 54) | def _infer_instance(self, tokens: Iterable[str]) -> List[List[Tuple[fl... method __call__ (line 66) | def __call__(self, batch: Iterable[Iterable[str]], *args, **kwargs) ->... FILE: deeppavlov/models/spelling_correction/levenshtein/tabled_trie.py class Trie (line 21) | class Trie: method __init__ (line 44) | def __init__(self, alphabet, make_sorted=True, make_alphabet_codes=True, method initialize (line 58) | def initialize(self): method _make_default_node (line 66) | def _make_default_node(self): method save (line 75) | def save(self, outfile): method make_cashed (line 98) | def make_cashed(self): method make_numpied (line 105) | def make_numpied(self): method add (line 110) | def add(self, s): method fit (line 131) | def fit(self, words): method terminate (line 136) | def terminate(self): method __contains__ (line 146) | def __contains__(self, s): method words (line 153) | def words(self): method is_final (line 176) | def is_final(self, index): method find_partitions (line 188) | def find_partitions(self, s, max_count=1): method __len__ (line 214) | def __len__(self): method __repr__ (line 217) | def __repr__(self): method _add_descendant (line 231) | def _add_descendant(self, parent, s, final=False): method _add_empty_child (line 237) | def _add_empty_child(self, parent, code, final=False): method _descend_simple (line 248) | def _descend_simple(self, curr, s): method _descend_cashed (line 258) | def _descend_cashed(self, curr, s): method _set_final (line 278) | def _set_final(self, curr): method _get_letters (line 284) | def _get_letters(self, index, return_indexes=False): method _get_children_and_letters (line 297) | def _get_children_and_letters(self, index, return_indexes=False): method _get_children (line 308) | def _get_children(self, index): class TrieMinimizer (line 318) | class TrieMinimizer: method __init__ (line 319) | def __init__(self): method minimize (line 322) | def minimize(self, trie, dict_storage=False, make_cashed=False, make_n... method generate_postorder (line 392) | def generate_postorder(self, trie): function load_trie (line 416) | def load_trie(infile): function make_trie (line 464) | def make_trie(alphabet, words, compressed=True, is_numpied=False, function precompute_future_symbols (line 478) | def precompute_future_symbols(trie, n, allow_spaces=False): FILE: deeppavlov/models/tokenizers/lazy_tokenizer.py function lazy_tokenizer (line 25) | def lazy_tokenizer(batch): FILE: deeppavlov/models/tokenizers/nltk_moses_tokenizer.py class NLTKMosesTokenizer (line 23) | class NLTKMosesTokenizer(Component): method __init__ (line 35) | def __init__(self, escape: bool = False, *args, **kwargs): method __call__ (line 40) | def __call__(self, batch: List[Union[str, List[str]]]) -> List[Union[L... FILE: deeppavlov/models/tokenizers/nltk_tokenizer.py class NLTKTokenizer (line 24) | class NLTKTokenizer(Component): method __init__ (line 35) | def __init__(self, tokenizer: str = "wordpunct_tokenize", download: bo... method __call__ (line 43) | def __call__(self, batch: List[str]) -> List[List[str]]: FILE: deeppavlov/models/tokenizers/spacy_tokenizer.py function _try_load_spacy_model (line 29) | def _try_load_spacy_model(model_name: str, disable: Iterable[str] = ()): class StreamSpacyTokenizer (line 44) | class StreamSpacyTokenizer(Component): method __init__ (line 78) | def __init__(self, disable: Optional[Iterable[str]] = None, filter_sto... method __call__ (line 95) | def __call__(self, batch: Union[List[str], List[List[str]]]) -> Union[... method _tokenize (line 119) | def _tokenize(self, data: List[str], ngram_range: Optional[Tuple[int, ... method _lemmatize (line 155) | def _lemmatize(self, data: List[str], ngram_range: Optional[Tuple[int,... method _filter (line 189) | def _filter(self, items: List[str], alphas_only: bool = True) -> List[... method set_stopwords (line 212) | def set_stopwords(self, stopwords: List[str]) -> None: FILE: deeppavlov/models/tokenizers/split_tokenizer.py class SplitTokenizer (line 22) | class SplitTokenizer(Component): method __init__ (line 29) | def __init__(self, **kwargs) -> None: method __call__ (line 32) | def __call__(self, batch: List[str]) -> List[List[str]]: FILE: deeppavlov/models/tokenizers/utils.py function detokenize (line 19) | def detokenize(tokens): function ngramize (line 38) | def ngramize(items: List[str], ngram_range=(1, 1), doc: str = None) -> G... FILE: deeppavlov/models/torch_bert/crf.py class CRF (line 7) | class CRF(CRFbase): method __init__ (line 12) | def __init__(self, num_tags: int, batch_first: bool = False) -> None: method forward (line 21) | def forward(self, tags_batch: torch.LongTensor, y_masks: np.ndarray): FILE: deeppavlov/models/torch_bert/multitask_transformer.py class FocalLoss (line 35) | class FocalLoss(nn.Module): method __init__ (line 38) | def __init__(self, alpha=.5, gamma=2, categorical_loss=False, weight=N... method forward (line 45) | def forward(self, inputs, targets): function SoftCrossEntropyLoss (line 57) | def SoftCrossEntropyLoss(inputs, targets): function we_transform_input (line 62) | def we_transform_input(name): class BertForMultiTask (line 66) | class BertForMultiTask(nn.Module): method __init__ (line 77) | def __init__(self, tasks_num_classes, multilabel, task_types, method get_logits (line 120) | def get_logits(self, task_id, input_ids, attention_mask, token_type_ids): method predict_on_top (line 152) | def predict_on_top(self, task_id, last_hidden_state, labels=None): method forward (line 235) | def forward(self, task_id, input_ids, attention_mask, token_type_ids, ... class MultiTaskTransformer (line 241) | class MultiTaskTransformer(TorchModel): method __init__ (line 260) | def __init__( method _reset_cache (line 319) | def _reset_cache(self): method load (line 322) | def load(self, fname: Optional[str] = None, *args, **kwargs) -> None: method _make_input (line 332) | def _make_input(self, task_features, task_id, labels=None): method __call__ (line 389) | def __call__(self, *args): method train_on_batch (line 474) | def train_on_batch(self, *args): FILE: deeppavlov/models/torch_bert/torch_bert_ranker.py class TorchBertRankerModel (line 33) | class TorchBertRankerModel(TorchModel): method __init__ (line 46) | def __init__(self, pretrained_bert: str = None, method train_on_batch (line 98) | def train_on_batch(self, features_li: List[List[InputFeatures]], y: Un... method __call__ (line 125) | def __call__(self, features_li: List[List[InputFeatures]]) -> Union[Li... FILE: deeppavlov/models/torch_bert/torch_transformers_classifier.py class TorchTransformersClassifierModel (line 34) | class TorchTransformersClassifierModel(TorchModel): method __init__ (line 51) | def __init__(self, n_classes, method train_on_batch (line 123) | def train_on_batch(self, features: Dict[str, torch.tensor], y: Union[L... method __call__ (line 156) | def __call__(self, features: Dict[str, torch.tensor]) -> Union[List[in... method accepted_keys (line 196) | def accepted_keys(self) -> Tuple[str]: class AutoModelForBinaryClassification (line 204) | class AutoModelForBinaryClassification(torch.nn.Module): method __init__ (line 206) | def __init__(self, pretrained_bert, config): method forward (line 216) | def forward(self, class BinaryClassificationHead (line 257) | class BinaryClassificationHead(torch.nn.Module): method __init__ (line 258) | def __init__(self, config): method init_weights (line 267) | def init_weights(self): method forward (line 272) | def forward(self, features, **kwargs): FILE: deeppavlov/models/torch_bert/torch_transformers_el_ranker.py class TorchTransformersElRanker (line 36) | class TorchTransformersElRanker(TorchModel): method __init__ (line 48) | def __init__( method train_on_batch (line 71) | def train_on_batch(self, q_features: List[Dict], method __call__ (line 104) | def __call__(self, q_features: List[Dict], method save (line 137) | def save(self, fname: Optional[str] = None, *args, **kwargs) -> None: class TextEncoder (line 153) | class TextEncoder(nn.Module): method __init__ (line 161) | def __init__(self, pretrained_bert: str = None, method forward (line 174) | def forward(self, method load (line 195) | def load(self) -> None: class BilinearRanking (line 211) | class BilinearRanking(nn.Module): method __init__ (line 219) | def __init__(self, n_classes: int = 2, emb_size: int = 768, block_size... method forward (line 227) | def forward(self, text1: Tensor, text2: Tensor): class SiameseBertElModel (line 237) | class SiameseBertElModel(nn.Module): method __init__ (line 249) | def __init__( method forward (line 270) | def forward( method save (line 299) | def save(self) -> None: class TorchTransformersEntityRankerInfer (line 311) | class TorchTransformersEntityRankerInfer: method __init__ (line 325) | def __init__(self, pretrained_bert, method __call__ (line 356) | def __call__(self, contexts_batch: List[str], FILE: deeppavlov/models/torch_bert/torch_transformers_multiplechoice.py class TorchTransformersMultiplechoiceModel (line 32) | class TorchTransformersMultiplechoiceModel(TorchModel): method __init__ (line 47) | def __init__(self, n_classes, method train_on_batch (line 85) | def train_on_batch(self, features: Dict[str, torch.tensor], y: Union[L... method __call__ (line 110) | def __call__(self, features: Dict[str, torch.tensor]) -> Union[List[in... FILE: deeppavlov/models/torch_bert/torch_transformers_nll_ranking.py class TorchTransformersNLLRanker (line 35) | class TorchTransformersNLLRanker(TorchModel): method __init__ (line 44) | def __init__( method train_on_batch (line 63) | def train_on_batch(self, input_features: Dict[str, Any], positive_idx:... method __call__ (line 83) | def __call__(self, input_features: Dict[str, Any]) -> Union[List[int],... class NLLRanking (line 105) | class NLLRanking(nn.Module): method __init__ (line 115) | def __init__( method forward (line 140) | def forward( method load (line 171) | def load(self) -> None: FILE: deeppavlov/models/torch_bert/torch_transformers_sequence_tagger.py function token_from_subtoken (line 32) | def token_from_subtoken(units: torch.Tensor, mask: torch.Tensor) -> torc... function token_labels_to_subtoken_labels (line 117) | def token_labels_to_subtoken_labels(labels, y_mask, input_mask): class TorchTransformersSequenceTagger (line 134) | class TorchTransformersSequenceTagger(TorchModel): method __init__ (line 147) | def __init__(self, method train_on_batch (line 175) | def train_on_batch(self, method __call__ (line 214) | def __call__(self, method load (line 252) | def load(self, fname=None): method save (line 265) | def save(self, fname: Optional[str] = None, *args, **kwargs) -> None: FILE: deeppavlov/models/torch_bert/torch_transformers_squad.py function softmax_mask (line 33) | def softmax_mask(val, mask): class PassageReaderClassifier (line 38) | class PassageReaderClassifier(torch.nn.Module): method __init__ (line 46) | def __init__(self, config): method forward (line 52) | def forward(self, input_ids, attention_mask, token_type_ids): class TorchTransformersSquad (line 64) | class TorchTransformersSquad(TorchModel): method __init__ (line 83) | def __init__(self, method train_on_batch (line 116) | def train_on_batch(self, features: List[List[InputFeatures]], method accepted_keys (line 162) | def accepted_keys(self) -> Tuple[str]: method __call__ (line 169) | def __call__(self, features_batch: List[List[InputFeatures]]) -> Tuple[ FILE: deeppavlov/models/torch_bert/torch_transformers_syntax_parser.py class Biaffine (line 35) | class Biaffine(nn.Module): method __init__ (line 36) | def __init__(self, in1_features: int, in2_features: int, out_features:... method forward (line 42) | def forward(self, input1: torch.Tensor, input2: torch.Tensor) -> torch... class PairwiseBilinear (line 48) | class PairwiseBilinear(nn.Module): method __init__ (line 53) | def __init__(self, in1_features: int, in2_features: int, out_features:... method reset_parameters (line 65) | def reset_parameters(self): method forward (line 71) | def forward(self, input1: torch.Tensor, input2: torch.Tensor) -> torch... method extra_repr (line 83) | def extra_repr(self) -> str: function mask_arc (line 90) | def mask_arc(lengths: torch.Tensor, mask_diag: bool = True) -> Optional[... class SyntaxParserNetwork (line 105) | class SyntaxParserNetwork(torch.nn.Module): method __init__ (line 112) | def __init__(self, n_deps: int, pretrained_bert: str, encoder_layer_id... method forward (line 146) | def forward(self, input_ids, attention_mask, subtoken_mask, y_heads=No... class TorchTransformersSyntaxParser (line 230) | class TorchTransformersSyntaxParser(TorchModel): method __init__ (line 245) | def __init__(self, pretrained_bert: str, method train_on_batch (line 259) | def train_on_batch(self, input_ids: Union[List[List[int]], np.ndarray], method __call__ (line 284) | def __call__(self, input_ids: Union[List[List[int]], np.ndarray], FILE: deeppavlov/models/vectorizers/hashing_tfidf_vectorizer.py function hash_ (line 33) | def hash_(token: str, hash_size: int) -> int: class HashingTfIdfVectorizer (line 47) | class HashingTfIdfVectorizer(Estimator): method __init__ (line 68) | def __init__(self, tokenizer: Component, hash_size=2 ** 24, doc_index:... method __call__ (line 90) | def __call__(self, questions: List[str]) -> Sparse: method get_index2doc (line 129) | def get_index2doc(self) -> Dict[Any, int]: method get_counts (line 138) | def get_counts(self, docs: List[str], doc_ids: List[Any]) \ method get_count_matrix (line 168) | def get_count_matrix(self, row: List[int], col: List[int], data: List[... method get_tfidf_matrix (line 187) | def get_tfidf_matrix(count_matrix: Sparse) -> Tuple[Sparse, np.array]: method save (line 207) | def save(self) -> None: method reset (line 237) | def reset(self) -> None: method load (line 248) | def load(self) -> Tuple[Sparse, Dict]: method partial_fit (line 270) | def partial_fit(self, docs: List[str], doc_ids: List[Any], doc_nums: L... method fit (line 290) | def fit(self, docs: List[str], doc_ids: List[Any], doc_nums: List[int]... FILE: deeppavlov/paramsearch.py function get_best_params (line 43) | def get_best_params(combinations, scores, param_names, target_metric): function main (line 51) | def main(): FILE: deeppavlov/settings.py function main (line 24) | def main(): FILE: deeppavlov/utils/benchmarks/benchmarks.py function split_config (line 71) | def split_config(config_path, download): function get_predictions (line 90) | def get_predictions(model, data_gen, replace_word=None, round_res=False): function submit_glue (line 113) | def submit_glue(config_path, output_path, download): function commonsense_reasoning_prediction (line 154) | def commonsense_reasoning_prediction(model, data_gen): function multi_sentence_comprehension_prediction (line 183) | def multi_sentence_comprehension_prediction(model, data_gen): function submit_superglue (line 232) | def submit_superglue(config_path, output_path, download): function submit_rsg (line 274) | def submit_rsg(config_path, output_path, download): function main (line 316) | def main(): FILE: deeppavlov/utils/connector/dialog_logger.py class DialogLogger (line 31) | class DialogLogger: method __init__ (line 45) | def __init__(self, enabled: bool = False, logger_name: Optional[str] =... method _get_timestamp_utc_str (line 56) | def _get_timestamp_utc_str() -> str: method _get_log_file (line 65) | def _get_log_file(self): method _log (line 77) | def _log(self, utterance: Any, direction: str, dialog_id: Optional[Has... method log_in (line 109) | def log_in(self, utterance: Any, dialog_id: Optional[Hashable] = None)... method log_out (line 118) | def log_out(self, utterance: Any, dialog_id: Optional[Hashable] = None... FILE: deeppavlov/utils/pip_wrapper/pip_wrapper.py function install (line 30) | def install(*packages): function get_config_requirements (line 42) | def get_config_requirements(config: [str, Path, dict]): function install_from_config (line 55) | def install_from_config(config: [str, Path, dict]): FILE: deeppavlov/utils/server/metrics.py function metrics (line 30) | def metrics(request: Request) -> Response: class PrometheusMiddleware (line 34) | class PrometheusMiddleware(BaseHTTPMiddleware): method __init__ (line 35) | def __init__(self, app: ASGIApp, ignore_paths: Tuple = ()) -> None: method dispatch (line 39) | async def dispatch(self, request: Request, call_next: RequestResponseE... FILE: deeppavlov/utils/server/server.py function get_server_params (line 73) | def get_server_params(model_config: Union[str, Path]) -> Dict: function get_ssl_params (line 97) | def get_ssl_params(server_params: dict, function redirect_root_to_docs (line 124) | def redirect_root_to_docs(fast_app: FastAPI, func_name: str, endpoint: s... function interact (line 134) | def interact(model: Chainer, payload: Dict[str, Optional[List]]) -> List: function test_interact (line 167) | def test_interact(model: Chainer, payload: Dict[str, Optional[List]]) ->... function start_model_server (line 176) | def start_model_server(model_config: Path, FILE: deeppavlov/utils/socket/socket.py function encode (line 34) | def encode(data: Any) -> bytes: class SocketServer (line 61) | class SocketServer: method __init__ (line 86) | def __init__(self, method start (line 127) | def start(self) -> None: method _handle_client (line 139) | async def _handle_client(self, reader: asyncio.StreamReader, writer: a... method _interact (line 170) | async def _interact(self, data: dict) -> bytes: method _response (line 206) | def _response(status: str = 'OK', payload: Optional[List[Tuple]] = Non... function start_socket_server (line 221) | def start_socket_server(model_config: Path, socket_type: str, port: Opti... FILE: deeppavlov/vocabs/typos.py class StaticDictionary (line 32) | class StaticDictionary: method __init__ (line 48) | def __init__(self, data_dir: [Path, str] = '', *args, dictionary_name:... method _get_source (line 90) | def _get_source(data_dir, raw_dictionary_path, *args, **kwargs): method _normalize (line 97) | def _normalize(word): class RussianWordsVocab (line 102) | class RussianWordsVocab(StaticDictionary): method __init__ (line 116) | def __init__(self, data_dir: [Path, str] = '', *args, **kwargs): method _get_source (line 121) | def _get_source(*args, **kwargs): class Wiki100KDictionary (line 129) | class Wiki100KDictionary(StaticDictionary): method __init__ (line 144) | def __init__(self, data_dir: [Path, str] = '', *args, **kwargs): method _get_source (line 149) | def _get_source(*args, **kwargs): FILE: deeppavlov/vocabs/wiki_sqlite.py class WikiSQLiteVocab (line 26) | class WikiSQLiteVocab(SQLiteDataIterator, Component): method __init__ (line 39) | def __init__(self, load_path: str, join_docs: bool = True, shuffle: bo... method __call__ (line 43) | def __call__(self, doc_ids: Optional[List[List[Any]]] = None, *args, *... FILE: setup.py function read_requirements (line 24) | def read_requirements(): function readme (line 40) | def readme(): FILE: tests/test_quick_start.py function _override_with_test_values (line 294) | def _override_with_test_values(item: Union[dict, list]) -> None: function download_config (line 306) | def download_config(config_path): function install_config (line 341) | def install_config(config_path): function setup_module (line 351) | def setup_module(): function teardown_module (line 369) | def teardown_module(): function _infer (line 377) | def _infer(config, inputs, download=False): class TestQuickStart (line 389) | class TestQuickStart(object): method infer (line 391) | def infer(config_path, qr_list=None, check_outputs=True): method infer_api (line 406) | def infer_api(config_path, qr_list): method infer_socket (line 448) | def infer_socket(config_path, socket_type): method test_inferring_pretrained_model (line 511) | def test_inferring_pretrained_model(self, model, conf_file, model_dir,... method test_inferring_pretrained_model_api (line 521) | def test_inferring_pretrained_model_api(self, model, conf_file, model_... method test_inferring_pretrained_model_socket (line 527) | def test_inferring_pretrained_model_socket(self, model, conf_file, mod... method test_consecutive_training_and_inferring (line 538) | def test_consecutive_training_and_inferring(self, model, conf_file, mo... function test_crossvalidation (line 563) | def test_crossvalidation(): function test_hashes_existence (line 587) | def test_hashes_existence(): function test_aliases (line 611) | def test_aliases(): FILE: utils/prepare/hashes.py function tar_md5 (line 27) | def tar_md5(fpath: Union[str, Path], chunk_size: int = 2 ** 16) -> Dict[... function gzip_md5 (line 44) | def gzip_md5(fpath: Union[str, Path], chunk_size: int = 2 ** 16) -> str: function zip_md5 (line 52) | def zip_md5(fpath: Union[str, Path], chunk_size: int = 2 ** 16) -> Dict[... function compute_hashes (line 66) | def compute_hashes(fpath: Union[str, Path]) -> Dict[str, str]: function main (line 82) | def main(fname: str, outfile: Optional[str] = None) -> None: FILE: utils/prepare/optimize_ipynb.py function merge_markdown (line 27) | def merge_markdown(nb: nbf.notebooknode.NotebookNode) -> None: function drop_metadata (line 45) | def drop_metadata(nb: nbf.notebooknode.NotebookNode) -> None: function update_file (line 52) | def update_file(path: Path, update_ckpts: bool) -> None: function main (line 74) | def main() -> None: FILE: utils/prepare/upload.py function upload (line 25) | def upload(config_in_file: str, tar_name: str, tar_output_dir: Path):