Re: [Apertium-stuff] Lexical Selection

2020-04-03 Thread Kevin Brubeck Unhammer
Jaume Ortolà i Font
 čálii:

> Missatge de egea piñeiro helena 
>  del dia dc., 1
> d’abr. 2020 a les 10:48:
>
>> How to show the text translated with the multiple options due to polisemy.
>> "The *season/station* more rainy is"
>>
>
> This is a recurrent request, that could be useful in some applications, but
> there is no way to do it in Apertium now.

You can make a new pipeline that splits into separate lexical units
instead of disambiguating. There's an example for eng-ita at
http://wiki.apertium.org/wiki/Translate_without_disambiguation

Basically, replace cg-proc+apertium-tagger

#!/usr/bin/python3
import streamparser,sys
for (b, lu) in streamparser.parse_file(sys.stdin,with_text=True):
 print(b+"[/]".join(["^"+streamparser.reading_to_string(r)+"$" for r in 
lu.readings]),end="")'

and replace lrx-proc with

#!/usr/bin/python3
import streamparser,sys
for (b, lu) in streamparser.parse_file(sys.stdin, with_text=True):
  print(b + 
"[/]".join(["^"+lu.wordform+"/"+streamparser.reading_to_string(r)+"$" for r in 
lu.readings]), end="")'

in your pipeline and you get slash-separated alternatives.


Of course, this won't get handled correctly by transfer (transfer will
see e.g. several nouns in a row where there was one source noun), but if
all you want is to send all alternatives through, it may be Good Enough
for some purposes (e.g. testvoc, or MT for language learning).


signature.asc
Description: PGP signature
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Lexical Selection

2020-04-03 Thread Tanmai Khanna
To show the translated text with multiple options due to polysemy would
require Apertium to preserve all the polysemous forms of a word in the
Lexical Unit. While this isn't possible as of now, we're working on a
project to try and extend the Apertium stream such that we can include an
arbitrary amount of secondary/optional information.

Once this is done, we can add an option to preserve the disambiguated
option as well as the other possible options in the Lexical Unit, and then
output all of these instead of the one that seems the most likely.

Tanmai

On Fri, Apr 3, 2020 at 3:47 PM Jaume Ortolà i Font 
wrote:

> Missatge de egea piñeiro helena  del dia dc., 1
> d’abr. 2020 a les 10:48:
>
>> How to show the text translated with the multiple options due to
>> polisemy.
>> "The *season/station* more rainy is"
>>
>
> This is a recurrent request, that could be useful in some applications,
> but there is no way to do it in Apertium now.
>
>
>> Also, to study this, I'm trying to find out how to make some changes on
>> the lexical rules (.lrx files) and see an actual change on the output, but
>> the commands through the pipeline doesn't seem to refer to that file. All
>> that I can change to test different polisemy cases are the 'srl' and 'lrs'
>> on the dictionary  ammong the 'D' option (default). I assumed the
>> autloex.bin somehow called the lrx file but I don't know for sure and I
>> couldn't find information so far.
>>
>
> You can also see examples of lexical selection rules in the spa-cat
> metalrx files. In eng-cat, Marc Riera can tell you how it is done.
>
> Jaume Ortolà
>
> ___
> Apertium-stuff mailing list
> Apertium-stuff@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>


-- 
*Khanna, Tanmai*
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Lexical Selection

2020-04-03 Thread Jaume Ortolà i Font
Missatge de egea piñeiro helena  del dia dc., 1
d’abr. 2020 a les 10:48:

> How to show the text translated with the multiple options due to polisemy.
> "The *season/station* more rainy is"
>

This is a recurrent request, that could be useful in some applications, but
there is no way to do it in Apertium now.


> Also, to study this, I'm trying to find out how to make some changes on
> the lexical rules (.lrx files) and see an actual change on the output, but
> the commands through the pipeline doesn't seem to refer to that file. All
> that I can change to test different polisemy cases are the 'srl' and 'lrs'
> on the dictionary  ammong the 'D' option (default). I assumed the
> autloex.bin somehow called the lrx file but I don't know for sure and I
> couldn't find information so far.
>

You can also see examples of lexical selection rules in the spa-cat metalrx
files. In eng-cat, Marc Riera can tell you how it is done.

Jaume Ortolà
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


[Apertium-stuff] Error in morph analysis mode of beta.apertium.org

2020-04-03 Thread Juan Pablo

Dear all,

I went to beta.apertium.org because I wanted to easily showcase other 
people the lemmatization that can be achieved with Apertium. So, I tried 
to use the "morphological analysis" on that web server, but it gives 
"error" as an output (My interest was for Aragonese and Catalan, but it 
happens the same for the rest of languages i tried).


https://beta.apertium.org/index.arg.html?choice=arg=Esto%20ye%20una%20prebatina#analyzation

Could someone check it that is something easy to solve? Is there some 
alternative web-based service were the morphological analysis is output?


Best regards,
Juan Pablo



___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff