diff --git a/{{cookiecutter.project_slug}}/app/spacy_extractor.py b/{{cookiecutter.project_slug}}/app/spacy_extractor.py index 4da3b9d..81e0f23 100644 --- a/{{cookiecutter.project_slug}}/app/spacy_extractor.py +++ b/{{cookiecutter.project_slug}}/app/spacy_extractor.py @@ -26,14 +26,14 @@ def __init__( self.input_id_col = input_id_col self.input_text_col = input_text_col - def _name_to_id(self, text: str): + def _name_to_id(self, text: str) -> str: """Utility function to do a messy normalization of an entity name text (str): text to create "id" from """ return "-".join([s.lower() for s in text.split()]) - def extract_entities(self, records: List[Dict[str, str]]): + def extract_entities(self, records: List[Dict[str, str]]) -> List[dict]: """Apply the pre-trained model to a batch of records records (list): The list of "document" dictionaries each with an