Menu ▾ ▴

#121 avoiding forced-uppercase generation when identical dictionary-uppercase exists

closed
nobody
2017-05-18
2017-04-21
No

Originally discussed in thread
avoiding forced-uppercase generation when identical dictionary-uppercase exists Kevin Brubeck Unhammer Tue, 28 Feb 2017 01:34:30 -0800 (nabble)


If I have this in foo.dix:

<e><p><l>PC-ane</l><r>PC<s n="n"/><s n="m"/><s n="pl"/><s n="def"/></r></p></e>

then I get

$ echo '^PC<n><m><pl><def>$' | lt-proc -d foo.autogen.bin
PC-ane

which is what I want. However, sometimes people write compounds in
lowercase, so I try including both upper and lower-case lemmas (I only
care about generation now):

<e><p><l>pc-ane</l><r>pc<s n="n"/><s n="m"/><s n="pl"/><s n="def"/></r></p></e>
<e><p><l>PC-ane</l><r>PC<s n="n"/><s n="m"/><s n="pl"/><s n="def"/></r></p></e>

but that gives

$ echo '^PC<n><m><pl><def>$' | lt-proc -d foo.autogen.bin
PC-ane/PC-ANE

Would it make sense for lt-proc to not output forced-uppercase analyses
if there's an otherwise identical dictionary-uppercase analysis? (Would
it be easily implementable?)

The only other solution I can think of is to put a tag on anything that
has an uppercase lemma, which sounds like more testvoc.

Discussion

  • Kevin Brubeck Unhammer

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,5 @@
     Originally discussed in thread
    -[avoiding forced-uppercase generation when identical dictionary-uppercase exists Kevin Brubeck Unhammer Tue, 28 Feb 2017 01:34:30 -0800](https://www.mail-archive.com/apertium-stuff@lists.sourceforge.net/msg06099.html)
    +[avoiding forced-uppercase generation when identical dictionary-uppercase exists Kevin Brubeck Unhammer Tue, 28 Feb 2017 01:34:30 -0800](https://www.mail-archive.com/apertium-stuff@lists.sourceforge.net/msg06099.html) ([nabble](http://comp-nlp-apertium.2368123.n4.nabble.com/Apertium-stuff-avoiding-forced-uppercase-generation-when-identical-dictionary-uppercase-exists-td58.html))
    
     -----
    
     
  • Jim O'Regan

    Jim O'Regan - 2017-04-21

    My changes there won't solve this particular issue (yet :), it just handles a somewhat similar problem with mixed case.

     
  • Kevin Brubeck Unhammer

    Actually, it seems to:

    $ cat tests/data/carefulcase-mono.dix
    <?xml version="1.0" encoding="UTF-8"?>
    <dictionary>
     <alphabet/>
     <sdefs>
       <sdef n="n"/>
       <sdef n="m"/>
       <sdef n="pl"/>
       <sdef n="def"/>
     </sdefs>
     <section id="main" type="standard">
    
    <e><p><l>pc-ane</l><r>pc<s n="n"/><s n="m"/><s n="pl"/><s n="def"/></r></p></e>
    <e><p><l>PC-ane</l><r>PC<s n="n"/><s n="m"/><s n="pl"/><s n="def"/></r></p></e>
    
     </section>
    </dictionary>
    
    $ lttoolbox/lt-comp rl tests/data/carefulcase-mono.dix tests/data/carefulcase-mono.bin
    main@standard 8 8
    
    $ echo '^PC<n><m><pl><def>$ ^pc<n><m><pl><def>$' | lttoolbox/lt-proc -C tests/data/carefulcase-mono.bin
    PC-ane pc-ane
    

    vs old

    $ echo '^PC<n><m><pl><def>$ ^pc<n><m><pl><def>$' | lt-proc -g tests/data/carefulcase-mono.bin
    PC-ane/PC-ANE pc-ane
    
     

    Last edit: Kevin Brubeck Unhammer 2017-04-21
  • Jim O'Regan

    Jim O'Regan - 2017-05-17

    Ok, committed

     
  • Jim O'Regan

    Jim O'Regan - 2017-05-17
    • status: open --> closed
     
  • Kevin Brubeck Unhammer

    Nice! Btw, would it be possible to make the option compatible with -g or -d or -n? So we can do lt-proc -g -C or lt-proc -n -C, since modes.xml typically say lt-proc $1 in order to let the driver script optionally remove unknown word marks.

     
    • Jim O'Regan

      Jim O'Regan - 2017-05-18

      On 18 May 2017 at 09:41, Kevin Brubeck Unhammer unhammer@users.sf.net wrote:

      Nice! Btw, would it be possible to make the option compatible with -g or -d
      or -n? So we can do lt-proc -g -C or lt-proc -n -C, since modes.xml
      typically say lt-proc $1 in order to let the driver script optionally remove
      unknown word marks.

      Give it about two weeks, I'll probably need -d by then.

       

Log in to post a comment.