Skip to content

Commit

Permalink
Refactor frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed May 7, 2021
1 parent 4cfc939 commit b809a95
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,18 @@ def background_process_arg():
# Arg-Mining Tags
classifier = request.form.get('classifier')
doc = sender.send(text, classifier)
currentPos = 0
current_pos = 0
for sentence in doc:
for token in sentence:
start = text.find(token["token"], currentPos)
start = text.find(token["token"], current_pos)
end = start + len(token["token"])
currentPos = end
currentWord = {
current_pos = end
current_word = {
'start': start,
'end': end,
'type': token["label"],
}
data.append(currentWord)
data.append(current_word)

data = do_label_arg(data)

Expand Down

0 comments on commit b809a95

Please sign in to comment.