Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -123,7 +123,7 @@ def ner(text):
|
|
123 |
|
124 |
slot_tokens = []
|
125 |
|
126 |
-
words[0] = words[0].upper() + words[1:]
|
127 |
for word, pred in zip(words, slot_preds):
|
128 |
word = word.replace("_", " ")
|
129 |
if pred == 'O':
|
|
|
123 |
|
124 |
slot_tokens = []
|
125 |
|
126 |
+
words[0] = words[0][0].upper() + words[0][1:] # capitalize the first word of sentence
|
127 |
for word, pred in zip(words, slot_preds):
|
128 |
word = word.replace("_", " ")
|
129 |
if pred == 'O':
|