Services extraction¶
The City_services class is designed to extract city service names from text using a string comparison algorithm, taking into account the changing service endings in the text. Using the flair library, the City_services.run() method in messages extracts named entities from the Sentence object as a list, as well as the most probable service type, and stores them in new columns of the original DataFrame().
- class soika.src.utils.data_processing.city_services_extract.City_services(model_name: str = 'Glebosol/city_services')[исходный код]¶
- extraction_services(text)[исходный код]¶
- remove_last_letter()[исходный код]¶
- replace_with_most_similar()[исходный код]¶
- run(df, text_column)[исходный код]¶