Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glosser: Improper sumti labeling with modal tags #23

Open
ChemistMikeLam opened this issue Jan 10, 2022 · 3 comments
Open

Glosser: Improper sumti labeling with modal tags #23

ChemistMikeLam opened this issue Jan 10, 2022 · 3 comments

Comments

@ChemistMikeLam
Copy link

The "highlighted", "simplified tree" and "boxes" tabs seem to mislabel sumti(s) when modal tags are present.

Whenever I have a sumti following a modal tag, the sumti is labelled as a modal sumti, even if I already close the tag with ku. According to CLL 9.9, the ku would take the place of the modal sumti, so the next sumti should not be interpreted as part of the modal tag.

Also, the numbering of sumtis also seems to be messed up by the presence of a modal tag.

I am not 100% percent sure, but the "raw tree" and "parse tree" tabs seem unaffected. I also tried the prettied outputs of the camxes-beta engine, which correctly places ku inside the tag, and the following sumti outside of the tag. These observations led me to believe that the problem lies somewhere in the process of simplifying the parse tree in the glosser.

@ChemistMikeLam
Copy link
Author

I have tried to read through the glosser files, and I believe that the function to blame is tree.js/numberSumtiInSentence, in particular this loop at lines 297-330. I believe that we need to add a case checking for a ku when nextIsModal is true, where we should toggle that boolean to false, such that the next sumti would not be treated as a modal sumti. This would also fix the numbering.

Since I am very unfamiliar both with this project and with js, I have no confidence in being able to write the correct code for that. I am also not sure whether the suggested check would break other cases, especially considering that ku might be used to terminate a number of constructs, potentially leading to false-positives.

@lagleki
Copy link
Contributor

lagleki commented Jan 10, 2022 via email

@ChemistMikeLam
Copy link
Author

I am sorry, but I don't think I can handle this in any time soon.

I tried to read the codes to see if I can understand what they mean, but since I do not have any experience with javascript, I only have a very rough understanding of the code. I am not even sure that my understanding is correct, since I read the code by educated guess through analogy with other languages. I also do not quite understand the PEG files. I do not think I have enough time and energy currently to dive into understanding these files. Without a good enough understanding of the code base, I do not feel comfortable to make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants