Phones API for Python#
- class eot.wowool.phones.Phones#
Phone component that can be use in a Pipeline
- __init__(countries: list[str] = None, distance: int = 200)#
Initialize the Phones application.
- Parameters
countries – list of default country names that could resolve a local phone number
countries – list[str]
distance – The maximum distance between a location and the phone number to be considered. default = 200
distance – int
- __call__(document: eot.wowool.document.document.Document, diagnostics: eot.wowool.diagnostic.Diagnostics) eot.wowool.document.document.Document #
Normalize phone number in the E164 format and collect information in the document object.
- Parameters
document (Document) – The document we want to enrich with phone number information.
- Returns
The given document with the new annotations. See the json format