-
Notifications
You must be signed in to change notification settings - Fork 15
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
Comments
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 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 |
Can't you make a fork and try it? Yes, we don't have a test kit but even
manual on a bunch of various by structure sentences might be good enough
…On Mon, Jan 10, 2022, 20:34 ChemistMikeLam ***@***.***> wrote:
I have tried to read through the glosser files, and I believe that the
function to blame is tree.js/numberSumtiInSentence
<https://github.com/lojban/ilmentufa/blob/5ad0cef3e5f34efcbd01391a84e1e799bf0f5c87/glosser/tree.js#L273-L331>,
in particular this loop at lines 297-330
<https://github.com/lojban/ilmentufa/blob/5ad0cef3e5f34efcbd01391a84e1e799bf0f5c87/glosser/tree.js#L297-L330>.
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.
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASNCEK6NB3PL7NMSGHZULLUVMKD5ANCNFSM5LT7EW5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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. |
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, theku
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.The text was updated successfully, but these errors were encountered: