amirhoseinsedaghati commited on
Commit
ee2f3fb
·
verified ·
1 Parent(s): b00df13

Update pages/Analyze_Text.py

Browse files
Files changed (1) hide show
  1. pages/Analyze_Text.py +2 -1
pages/Analyze_Text.py CHANGED
@@ -29,7 +29,8 @@ def get_tokens_analysis(text):
29
 
30
  def get_entities_tokens(text):
31
  doc_obj = nlp(text)
32
- html = displacy.render(doc_obj, style='ent')
 
33
  html = html.replace('\n\n', '\n')
34
  entities_tokens_html = HTML_WRAPPER.format(html)
35
  return entities_tokens_html
 
29
 
30
  def get_entities_tokens(text):
31
  doc_obj = nlp(text)
32
+ options = {'colors' : {'MONEY' : '#3480f3'}}
33
+ html = displacy.render(doc_obj, style='ent', options=options)
34
  html = html.replace('\n\n', '\n')
35
  entities_tokens_html = HTML_WRAPPER.format(html)
36
  return entities_tokens_html