Skip to content

Commit

Permalink
Handle cases where sentences don't parse and return None
Browse files Browse the repository at this point in the history
  • Loading branch information
snadi committed Oct 7, 2019
1 parent 4071a44 commit 883b305
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def find_interesting_sentences(questions):

#get conditional sentences (our technique and also includes just sentences with "if")
cond_sentences, count1, count2 = get_cond_sentences_from_para(paragraph, q_id=question['question_id'], answ_id=answer['answer_id'], parag_index=paragraph_index)
all_interesting_sentences.extend(cond_sentences)
if cond_sentences is not None:
all_interesting_sentences.extend(cond_sentences)

return all_interesting_sentences

Expand Down Expand Up @@ -125,8 +126,7 @@ def main():
benchmark = load_benchmark()

print ("Benchmark size: " + str(len(benchmark)))
# print ("Insightful count: " + str(len(benchmark_yes)))
# print ("Not Insightful count: " + str(len(benchmark_no)))

all_interesting_sentences = list()
init_corenlp()

Expand Down

0 comments on commit 883b305

Please sign in to comment.