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

Doesn't work for simple example #6

Closed
ftyers opened this issue Apr 7, 2019 · 10 comments
Closed

Doesn't work for simple example #6

ftyers opened this issue Apr 7, 2019 · 10 comments
Labels
question Further information is requested

Comments

@ftyers
Copy link
Member

ftyers commented Apr 7, 2019

<dictionary type="sequential">
<sdefs>
<sdef n="det"/>
<sdef n="abl"/>
<sdef n="dem"/>
<sdef n="n"/>
<sdef n="cnjadv"/>
</sdefs>
<section id="main" type="standard">
<e><p><l>bu<s n="det"/><s n="dem"/><j/>yüz<s n="n"/><s n="abl"/></l>
      <r>bu<b/>yüzden<s n="cnjadv"/></r></p></e>
</section>
</dictionary>

Then compile:

$ lsx-comp lr apertium-tur-uzb.tur-uzb.lsx tur-uzb.autosep.bin
main@standard 11 10

Show the transducer:

$ lt-print tur-uzb.autosep.bin
0	1	b	b	0.000000	
1	2	u	u	0.000000	
2	3	<det>	 	0.000000	
3	4	<dem>	y	0.000000	
4	5	<$>	ü	0.000000	
5	6	y	z	0.000000	
6	7	ü	d	0.000000	
7	8	z	e	0.000000	
8	9	<n>	n	0.000000	
9	10	<abl>	<cnjadv>	0.000000	
10	0.000000

But it doesn't work:

$ echo "^bu<det><dem>$ ^yüz<n><abl>$" | lsx-proc tur-uzb.autosep.bin 
^bu<det><dem>$ ^yüz<n><abl>$

Expected output is:

^bu yüzden<cnjadv>$

@jonorthwash @itang1 @unhammer any ideas?

@ftyers ftyers added the bug Something isn't working label Apr 7, 2019
@jonorthwash
Copy link
Member

This is exactly the sort of problem we were having with apertium/apertium-eng-deu#4. We never really reported it officially.

@ogabek96
Copy link

ogabek96 commented Apr 8, 2019

I hope this issue solves

@jonorthwash
Copy link
Member

You might need <t> and/or <g> somewhere. See examples at #2 (comment).

@ftyers
Copy link
Member Author

ftyers commented Apr 8, 2019

It shouldn't need <t> because the tags are fixed. is only if there is # right? Or does it have another meaning?

@jonorthwash
Copy link
Member

@xavivars, @hectoralos, any thoughts about what @ftyers is doing wrong here?

@xavivars
Copy link
Member

xavivars commented Apr 9, 2019

I don't really know much about apertium-separable, on top of having fixed the null-flushing (I hope!). But honestly, now very little about the format.

On the issue you link to, I think I just played with Hector's rule until it worked...

@hectoralos
Copy link
Member

hectoralos commented Apr 9, 2019

Unfortunately, so is my knowledge of the module (which needs a better documentation). I just multiplied some constructions Fran wrote in fra-cat. I've been comparing what it is used in apertium-fra-cat and what is in this example, and in fra-cat there are a couple of <t/>. I've been trying if adding <t/> will help, but I couldn't match ^bu<det><dem>$ ^yüz<n><abl>$.

@jonorthwash
Copy link
Member

jonorthwash commented Apr 10, 2019

@ftyers, try the code I committed in apertium/apertium-tur-uzb@5081938. It works for me now.

Basically I just added <j/>.

@ftyers
Copy link
Member Author

ftyers commented Apr 10, 2019

Great, that should definitely go in the documentation, or alternatively the compiler should be updated to automatically add <j/> at the end of every entry.

@jonorthwash
Copy link
Member

I would file a new issue about not working without <j/>, suggesting that solution.

@jonorthwash jonorthwash added question Further information is requested and removed bug Something isn't working labels Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants