Skip to content

Commit

Permalink
Fix #167 remove part’s tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmirocks committed Jan 28, 2017
1 parent 8d2c504 commit 28f3d3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions nalaf/preprocessing/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ def parse(self, dataset):
'is_root': False,
}

part.tokens.append(nalaf_token)

for spacy_token in spacy_doc:
self._dependency_path(spacy_token, sent_index, part)

Expand Down Expand Up @@ -194,7 +192,6 @@ def parse(self, dataset):
'dependency_to': [],
'is_root': False,
}
part.tokens.append(tok)

for token in tokens:
tok = part.sentences[index][token.index-1]
Expand Down
4 changes: 1 addition & 3 deletions nalaf/structures/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,9 @@ def __init__(self, text, is_abstract=True):
self.is_abstract = is_abstract
"""whether the part is the abstract of the paper"""

# TODO this may be too relna-specific
self.sentence_parse_trees = []
"""the parse trees for each sentence stored as a string."""
# TODO this may be too relna-specific

self.tokens = []


def get_sentence_string_array(self):
Expand Down

0 comments on commit 28f3d3c

Please sign in to comment.