Skip to content

Commit

Permalink
fix export bug
Browse files Browse the repository at this point in the history
  • Loading branch information
etern committed Jun 7, 2020
1 parent 0d573c4 commit d18cce0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions YEDDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def initUI(self):

all_keys = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
for press_key in all_keys:
self.text.bind(press_key, self.textReturnEnter, add='')
self.text.bind(press_key, self.alphanum_key_pressed, add='')
if self.OS != "windows":
self.text.bind(f'<Control-Key-"{press_key}">', self.keepCurrent)
self.text.bind(f'<Command-Key-"{press_key}">', self.keepCurrent)
Expand Down Expand Up @@ -364,10 +364,8 @@ def returnEnter(self, event):
self.executeEntryCommand(content)
return content

def textReturnEnter(self, event):
def alphanum_key_pressed(self, event):
press_key = event.char
if self.debug:
print("Action Track: textReturnEnter")
self.pushToHistory()
print("event: ", press_key)
self.clearCommand()
Expand Down Expand Up @@ -683,7 +681,7 @@ def getWordTagPairs(tagedSentence, segmented=True, tagScheme="BMES", onlyNP=Fals
tagged_chunks.append(chunk)

if len(tagged_chunks) == 0:
return [(sentence, 0, len(sentence), False)]
tagged_chunks = [(sentence, 0, len(sentence), False)] # TODO semantically wrong

chunks = []
for idx in range(0, len(tagged_chunks)):
Expand Down

0 comments on commit d18cce0

Please sign in to comment.