Omnibus commited on
Commit
e729578
·
verified ·
1 Parent(s): cf5d00b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,13 +17,13 @@ def get_sen_list(text):
17
  def proc_sen(sen_list,cnt):
18
  blob_n = TextBlob(sen_list[cnt])
19
  noun_p=blob_n.noun_phrases
20
- print(dir(noun_p))
21
  noun_box1=[]
22
  for ea in blob_n.parse().split(" "):
23
  n=ea.split("/")
24
  if n[1] == "NN":
25
  noun_box1.append(n[0])
26
- json_object={'sen_num':cnt,'sentence':sen_list[cnt],'noun_phrase':noun_p.copy(),'nouns':noun_box1}
27
  return json_object
28
 
29
  def proc_nouns(sen_list):
 
17
  def proc_sen(sen_list,cnt):
18
  blob_n = TextBlob(sen_list[cnt])
19
  noun_p=blob_n.noun_phrases
20
+ #print(dir(noun_p))
21
  noun_box1=[]
22
  for ea in blob_n.parse().split(" "):
23
  n=ea.split("/")
24
  if n[1] == "NN":
25
  noun_box1.append(n[0])
26
+ json_object={'sen_num':cnt,'sentence':sen_list[cnt],'noun_phrase':[noun_p.copy()],'nouns':noun_box1}
27
  return json_object
28
 
29
  def proc_nouns(sen_list):