From e7c31f7eae7a61f5b7cebf0f40e08975da1835c2 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 6 Oct 2015 10:35:49 +1100 Subject: [PATCH] * Tweak information extraction example --- examples/information_extraction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/information_extraction.py b/examples/information_extraction.py index dbe17c1d8..19e93b499 100644 --- a/examples/information_extraction.py +++ b/examples/information_extraction.py @@ -45,14 +45,14 @@ def main(): nlp = English() texts = [ u'Net income was $9.4 million compared to the prior year of $2.7 million.', - u'Revenue exceeded twelve billion dollars, with a loss of $1b', + u'Revenue exceeded twelve billion dollars, with a loss of $1b.', ] for text in texts: doc = nlp(text) relations = extract_currency_relations(doc) for r1, r2 in relations: - print(r1.text, r2.ent_type_) + print(r1.text, r2.ent_type_, r2.text) if __name__ == '__main__':