Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions unsupervised/produce_labeled_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
NORMALIZER = DateNormalizer()


def label_sentence(entity_linking_results, debug, numerical):
def label_sentence(entity_linking_results, debug, numerical, language='italian'):
"""Produce a labeled sentence by comparing the linked entities to the frame definition

:param str entity_linking_results: path to JSON file containing the results of the
Expand Down Expand Up @@ -65,7 +65,7 @@ def label_sentence(entity_linking_results, debug, numerical):
assigned_fes = []
for diz in val:
# Filter out linked stopwords
if diz['chunk'].lower() in stopwords.StopWords.words('italian'):
if diz['chunk'].lower() in stopwords.StopWords.words(language):
continue

chunk = {
Expand Down