Skip to content

Commit

Permalink
Fixing the ilg inventory issue #787
Browse files Browse the repository at this point in the history
Previously, the autocategorize function did not work for a two-lined interlinear corpus.
I confirmed that #720 and #703 are not affected (i.e., unrecognized characters do not crash PCT).
  • Loading branch information
stannam committed Nov 25, 2021
1 parent 4ffdd7f commit 721e608
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions corpustools/gui/iogui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ def accept(self, b):
else:
# It's a Discourse object
c = self.corpus.lexicon
c.inventory.update_features(c.specifier)
unmatched = list()
for seg in c.inventory:
if seg.symbol in c.inventory.non_segment_symbols:
Expand Down
7 changes: 2 additions & 5 deletions corpustools/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def loadCorpus(self):
self.showTextAct.setEnabled(True)
self.showTextAct.setChecked(True)

else:#nothing special, just a corpus
else: #nothing special, just a corpus
self.corpus = self.compatibility_check(self.corpus)
self.textWidget.hide()
self.discourseTree.hide()
Expand Down Expand Up @@ -467,10 +467,7 @@ def generateInventoryModel(self):

if self.corpusModel.corpus.inventory.isNew:
# just loaded from a text file
if hasattr(self.corpusModel.corpus,'discourse'):
inventoryModel = InventoryModel(self.corpusModel.corpus.inventory, copy_mode=True)
else:
inventoryModel = InventoryModel(self.corpusModel.corpus.inventory, copy_mode=False)
inventoryModel = InventoryModel(self.corpusModel.corpus.inventory, copy_mode=False)
inventoryModel.updateFeatures(self.corpusModel.corpus.specifier)

else:
Expand Down

0 comments on commit 721e608

Please sign in to comment.