medcat.components.addons.relation_extraction.bert.tokenizer
Classes:
Attributes:
-
logger–
TokenizerWrapperBERT
TokenizerWrapperBERT(hf_tokenizers=None, max_seq_length: Optional[int] = None, add_special_tokens: Optional[bool] = False)
Bases: BaseTokenizerWrapper
Methods:
-
load–
Attributes:
-
name–Wrapper around a huggingface BERT tokenizer so that it works with the
-
pretrained_model_name_or_path–
Source code in medcat-v2/medcat/components/addons/relation_extraction/tokenizer.py
17 18 19 20 21 22 | |
name
class-attribute
instance-attribute
name = 'bert-tokenizer'
Wrapper around a huggingface BERT tokenizer so that it works with the RelCAT models.
Parameters:
-
–`transformers.models.bert.tokenization_bert_fast.PreTrainedTokenizerFast`)A huggingface Fast BERT.
pretrained_model_name_or_path
class-attribute
instance-attribute
pretrained_model_name_or_path = 'bert-base-uncased'
load
classmethod
load(tokenizer_path: str, relcat_config: ConfigRelCAT, **kwargs) -> TokenizerWrapperBERT
Source code in medcat-v2/medcat/components/addons/relation_extraction/bert/tokenizer.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |