Spaces:
Sleeping
Sleeping
KarishmaShirsath
commited on
Commit
•
495f267
1
Parent(s):
da8438c
Add more entities to recognize
Browse files- Final_file.py +5 -1
Final_file.py
CHANGED
@@ -778,9 +778,13 @@ class FlairRecognizer2():
|
|
778 |
|
779 |
|
780 |
|
|
|
|
|
|
|
|
|
781 |
analyzer = AnalyzerEngine()
|
782 |
|
783 |
-
results = analyzer.analyze(text=text, entities=
|
784 |
print("results:")
|
785 |
print(results)
|
786 |
|
|
|
778 |
|
779 |
|
780 |
|
781 |
+
entitiesToRecognize=['PHONE_NUMBER', 'PERSON', 'ID', 'LOCATION', 'EMAIL', 'URL', 'CREDIT_CARD', 'AGE', 'DATE_TIME', 'CRYPTO'
|
782 |
+
'IP_ADDRESS', 'US_PASSPORT', 'US_BANK_NUMBER'
|
783 |
+
]
|
784 |
+
|
785 |
analyzer = AnalyzerEngine()
|
786 |
|
787 |
+
results = analyzer.analyze(text=text, entities=entitiesToRecognize, language='en') # noqa D501
|
788 |
print("results:")
|
789 |
print(results)
|
790 |
|