ningrumdaud commited on
Commit
9cd08f7
1 Parent(s): 93a52d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -84,7 +84,7 @@ class NounExtractor:
84
  deps_in_phrase = {list_dep_labels[tok.i] for tok in current}
85
 
86
  # Merge logic based on 'phrases connectors' construction
87
- if i + 1 < len(noun_phrases) and (doc[current.end].text in ['of', 'in', 'among', 'on', 'towards', 'to', 'for']):
88
  next_phrase = noun_phrases[i + 1]
89
  if i + 2 < len(noun_phrases) and doc[next_phrase.end].dep_ == 'pcomp':
90
  extended_phrase = doc[current.start:noun_phrases[i + 2].end]
@@ -198,7 +198,8 @@ extractor = NounExtractor(nlp=nlp)
198
 
199
  # Example of how to use this function
200
  # words_list = ["so", "because", "contribute", "due to", "therefore", "as"]
201
- causative_verb = ['affect', 'influence', 'increase', 'against', 'bring', 'lead', 'result', 'cause', 'is to', 'was to', 'are to', "were to", 'contribute', 'make', 'attribute', 'provoke']
 
202
 
203
  # Define the callback function for the GUI
204
  def CogMapAnalysis(text):
 
84
  deps_in_phrase = {list_dep_labels[tok.i] for tok in current}
85
 
86
  # Merge logic based on 'phrases connectors' construction
87
+ if i + 1 < len(noun_phrases) and (doc[current.end].text in ['of', 'in', 'among', 'on', 'towards', 'to', 'for', 'across']):
88
  next_phrase = noun_phrases[i + 1]
89
  if i + 2 < len(noun_phrases) and doc[next_phrase.end].dep_ == 'pcomp':
90
  extended_phrase = doc[current.start:noun_phrases[i + 2].end]
 
198
 
199
  # Example of how to use this function
200
  # words_list = ["so", "because", "contribute", "due to", "therefore", "as"]
201
+ causative_verb = ['affect', 'influence', 'increase', 'against', 'bring', 'lead', 'result', 'cause', 'is to', 'was to',
202
+ 'are to', "were to", 'contribute', 'make', 'attribute', 'provoke', 'spark']
203
 
204
  # Define the callback function for the GUI
205
  def CogMapAnalysis(text):