Spaces:
Sleeping
Sleeping
Update analyzers/ner_analyzer.py
Browse files
analyzers/ner_analyzer.py
CHANGED
|
@@ -44,17 +44,17 @@ class NERAnalyzer(BaseAnalyzer):
|
|
| 44 |
representatives.append(current_person)
|
| 45 |
current_person = ""
|
| 46 |
|
| 47 |
-
if label in ["B-ORGANIZACAO", "I-ORGANIZACAO"]:
|
| 48 |
-
|
| 49 |
-
else:
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
|
| 54 |
if current_person:
|
| 55 |
representatives.append(current_person)
|
| 56 |
-
if current_organization:
|
| 57 |
-
|
| 58 |
|
| 59 |
return representatives
|
| 60 |
|
|
|
|
| 44 |
representatives.append(current_person)
|
| 45 |
current_person = ""
|
| 46 |
|
| 47 |
+
#if label in ["B-ORGANIZACAO", "I-ORGANIZACAO"]:
|
| 48 |
+
# current_organization += token.replace("##", "")
|
| 49 |
+
#else:
|
| 50 |
+
# if current_organization:
|
| 51 |
+
# representatives.append(current_organization)
|
| 52 |
+
# current_organization = ""
|
| 53 |
|
| 54 |
if current_person:
|
| 55 |
representatives.append(current_person)
|
| 56 |
+
#if current_organization:
|
| 57 |
+
# representatives.append(current_organization)
|
| 58 |
|
| 59 |
return representatives
|
| 60 |
|