thlinhares commited on
Commit
d33e303
·
verified ·
1 Parent(s): d54e72e

Update analyzers/ner_analyzer.py

Browse files
Files changed (1) hide show
  1. analyzers/ner_analyzer.py +12 -1
analyzers/ner_analyzer.py CHANGED
@@ -102,4 +102,15 @@ class NERAnalyzer(BaseAnalyzer):
102
  for rep in representatives:
103
  # Tentando associar o nome do representante ao percentual de participação
104
  if rep in participation_data:
105
-
 
 
 
 
 
 
 
 
 
 
 
 
102
  for rep in representatives:
103
  # Tentando associar o nome do representante ao percentual de participação
104
  if rep in participation_data:
105
+ representatives_with_percentage.append(f"{rep} ({participation_data[rep]}%)")
106
+ else:
107
+ representatives_with_percentage.append(rep)
108
+
109
+ return representatives_with_percentage
110
+
111
+ def format_output(self, representatives: List[str]) -> str:
112
+ output = "ANÁLISE DO CONTRATO SOCIAL (NER)\n\n"
113
+ output += "REPRESENTANTES IDENTIFICADOS:\n"
114
+ for rep in representatives:
115
+ output += f"- {rep}\n"
116
+ return output