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

Should categories really fallback to /sl if no /tl? #79

Open
unhammer opened this issue Nov 10, 2021 · 5 comments
Open

Should categories really fallback to /sl if no /tl? #79

unhammer opened this issue Nov 10, 2021 · 5 comments

Comments

@unhammer
Copy link
Member

If we have something like

number = (GD sg) sg pl GD ;
a_adj = sint ord ;
adj: _.a_adj.number;
A -> %adj { %1 };

and bidix output is ^good<adj><sint>/OK<adj>$ then I don't want the <sint> to be output, that's an "inherent" tag (the word OK is can't do synthetic comparative/superlative, so it doesn't get a <sint>). But to ensure that, I have to explicitly say that the attribute should have the tl value, for each such where bidix can remove it:

A -> %adj { %1[a_adj=1.a_adj/tl]  };

I know I can always be explicit like this, but I would think the default should be to not fallback here, that if bidix removes a tag, it's for a reason. Does anyone actively use sl fallbacks?

@jonorthwash @ftyers @marcriera and anyone else using apertium-recursive

@jonorthwash
Copy link
Member

jonorthwash commented Nov 26, 2021

Yes, I've run into this before and agree. Subcategory sl or tl tags (or even grammatical tags) included in bidix should somehow be treated together by default.

I've talked with @mr-martian about it before, and it seems like there are two issues involved in its implementation:

  • What is the right way to handle all this, at the level of the syntax?
  • How to implement it technically?

My impression is that the first issue is the blocking one.

@mr-martian
Copy link
Collaborator

A couple of options that come to mind that might address this issue and definitely wouldn't break backwards compatibility:

adj: _.a_adj/tl.number so that a_adj will never get clipped from sl but number retains the current default behavior

A compiler option that makes all unspecified clips be tl clips rather than the current tl > ref > sl fallback approach

Either of those would be pretty easy to implement, but there could very well be an option I haven't thought of that would be more correct.

@unhammer
Copy link
Member Author

I would prefer an all-or-nothing option, but would it be possible to do it as a file pragma? Like the CG subreadings option, we could have SIDE_SOURCES = tl ; or something (default value being = tl ref sl ;).

Since the rules in the files necessarily will depend on the value of that option, I prefer having it inside the rtx, instead of having to look it up in Makefile.am. (Also, having to remember compile switches while doing rtx-comp manually to debug means one more way I can mess things up at the time when I am the most confused.)

@marcriera
Copy link
Member

I've just bumped into this while doing some tests with apertium-spa-cat, where some entries "lose" a tag in bidix.

I agree with @unhammer regarding including the option directly in the file. Using a compiler option will probably lead to confusion. However, I think the two proposed solutions shouldn't be mutually exclusive. Currently I don't really need fallbacks and disabling them entirely would solve my issues, but I can imagine myself using them in the future. In that case, it would be good to have the ability to do something like adj: _.a_adj/tl.number and keep fallbacks enabled globally. Otherwise, we would need to add conditionals and rules could get too complicated.

@mr-martian
Copy link
Collaborator

I have implemented @unhammer's SIDE_SOURCES = tl ref sl ; syntax. It can be gotten by depending on version 1.1.2.

I'm leaving this issue open because I like the adj: _.a_adj/tl.number syntax but I need to think a little more about how to implement it.

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

4 participants