![]() popularity (float): The entity's popularity value. ![]() Args: entity (str): A normalized entity name. sys_types = gaz_data def _update_entity ( self, entity, popularity, keep_max = True ): """ Updates all gazetteer data with an entity and its popularity. def load ( self, gaz_path ): """Loads the gazetteer from disk Args: gaz_path (str): The location on disk where the gazetteer is stored """ gaz_data = joblib. text_preparation_pipeline = text_preparation_pipeline exclude_ngrams (bool): The boolean flat whether to exclude ngrams """ self. index (dict): A dictionary containing the inverted index, which maps terms and n-grams to the set of documents which contain them entities (list): A list of all entities sys_types (set): The set of nested numeric types for this entity """ def _init_ ( self, name, text_preparation_pipeline, exclude_ngrams = False ): """ Args: domain (str): The domain that this gazetteer is used text_preparation_pipeline (TextPreparationPipeline): Pipeline for tokenization and normalization of text. If there are more than one entity with the same name, the popularity is the maximum value across all duplicate entities. Attributes: entity_count (int): Total entities in the file pop_dict (dict): A dictionary containing the entity name as a key and the popularity score as the value. class Gazetteer : """ This class holds the following fields, which are extracted and exported to file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |