https://github.com/apertium/apertium-separable

Module for reordering separable/discontiguous multiwords.

https://github.com/apertium/apertium-separable

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 13 committers (7.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.2%) to scientific vocabulary

Keywords

apertium-core

Keywords from Contributors

morphological-generation apertium-languages apertium-tools apertium-trunk apertium-incubator apertium apertium-nursery mt italian-language italian
Last synced: 10 months ago · JSON representation

Repository

Module for reordering separable/discontiguous multiwords.

Basic Info
Statistics
  • Stars: 4
  • Watchers: 12
  • Forks: 4
  • Open Issues: 6
  • Releases: 9
Topics
apertium-core
Created over 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Authors

README

[Lttoolbox](https://wiki.apertium.org/wiki/Lttoolbox) provides a module for reordering
separable/discontiguous multiwords and processing them in the pipeline.
Multiwords are manually written in an additional xml-format dictionary.

## Installing

The module is part of the [nightly
repositories](https://wiki.apertium.org/wiki/Nightly_repositories) as `apt-get install
apertium-separable`.

If you'd like to compile it manually—e.g., for development purposes—you
can follow these instructions:

Prerequisites and compilation are the same as lttoolbox and apertium.
See [Installation](https://wiki.apertium.org/wiki/Installation).

The code can be found at
, and instructions for
compiling the module are:

    ./autogen.sh
    ./configure
    make
    make install

You'll need `lttoolbox` from git (or, greater than the current release
3.5.1) and associated libraries.

## Lexical transfer in the pipeline

lsx-proc runs directly AFTER apertium-tagger and apertium-pretransfer:  
(note: previously this page had said that lsx-proc runs between BETWEEN
apertium-tagger and apertium-pretransfer. it has now been determined
that it should run AFTER pretransfer.)

    … | apertium-tagger -g en-es.prob |  apertium-pretransfer | lsx-proc en-es.autoseq.bin | …

## Usage

### Creating the lsx-dictionary

The lsx dictionary format is largely similar to those of the [
morphological](https://wiki.apertium.org/wiki/Morphological_dictionary) and [
bilingual](https://wiki.apertium.org/wiki/Bilingual_dictionary) dictionaries. (see also:
[Apertium_New_Language_Pair_HOWTO](https://wiki.apertium.org/wiki/Apertium_New_Language_Pair_HOWTO)

We begin with a declaration of the dictionary. There is currently
nothing in it, only a declaration that we want to begin a new
dictionary.

    
    

Then add the alphabet entry, this can be empty as the alphabet is only
used for tokenisation and the lsx module comes after the text is
tokenised. Now we have:

    
         
    

Next we need to add the symbol definitions, abbreviated to sdefs. These
are the symbols that your words are tagged with, e.g. noun or verb or
adj. Again, you should be able to just copy the sdef section from your
language's monodix, and it should contain many more than in this basic
example.

    
        
        
            
            
            
            
            
        
    

Now we need to add the paradigm definitions, abbreviated to pardefs.
These represent patterns of word orders. The following example
represents words tagged as adjective, noun, noun phrase, and frequency
adjectives. See the note below about the tags , , . The lemma can be
represented as anychars (, such as in adj and n below; or by typing out
the word itself, such as in freq-adv below. Pardefs can be used to
create other pardefs, such as in SN below. Adding paradigms into the
dictionary, we get:

    
        
        
            ...
        
        
             
                 
                 
            
             #to represent all nouns
                 
            
             #to represent all noun phrases
                
                 
                 
            
            
                always 
                anually
                bianually
            
        
    

Finally, we add the main entries. Here is the final result of our small
example dictionary:

    
        
        
            
            
            
            
            
        
        
            
                
                
            
            
                
            
            
                
                
                
            
            
                always
                anually
                bianually
            
        
        

bebelate

late

taketakeaway

away

Note: - stands for one or more alphabetic symbols - stands for one or more tags (multicharacter symbols). - stands for the word boundary symbol $ i.e. - `` is equivalent to `any-one-or-more-chars``<...optional-anytag...><$>` - ^tall<...>$ - `` is equivalent to `any-one-or-more-chars``<$>` - ^tall$ A larger example dictionary can be found at . The lsx dictionary file names are of the form `apertium-A-B.A-B.lsx`, where apertium-A-B is the name of the language pair. For example, file `apertium-eng-cat.eng-cat.lsx` is the lsx dictionary for the `eng-cat` pair. The names of the compiled binaries are of the form `apertium-A-B.autoseq.bin`. For example, `eng-cat.autoseq.bin`. ### Compilation Compilation into the binary format is achieved by means of the lsx-comp program. Specifying lr as the mode will produce an analyser, and rl will produce a generator. $ lsx-comp lr apertium-eng-spa.eng-spa.lsx eng-spa.autoseq.bin main@standard 61 73 ### Processing Processing can be done using the lsx-proc program. The input to `lsx-proc` is the output of `apertium-tagger` and `apertium-pretransfer`, $ echo '^take$ ^prpers$ ^out of$ ^there$^.$' | lsx-proc eng-spa.autoseq.bin ^take# out$ ^prpers$ ^of$ ^there$^.$ ### Example usages Example #1: A sentence in plain text, The Aragonese took Ramiro out of a monastery and made him king. This is the output of feeding the sentence through `apertium-tagger` and then `apertium-pretransfer`: ^the$ ^Aragonese$ ^take$ ^Ramiro$ ^out of$ ^a$ ^monastery$ ^and$ ^make$ ^prpers$ ^king$^.$ This is the output of feeding the output above through `lsx-proc` with apertium-eng-spa.eng-spa.lsx: ^the$ ^Aragonese$ ^take# out$ ^Ramiro$ ^of$ ^a$ ^monastery$ ^and$ ^make$ ^prpers$ ^king$^.$ ## Troubleshooting ### Segmentation fault Segmentation fault upon compilation or usage The lsx-dictionary compiles fine with zero entries but gives a seg fault once entries are added ...no solution found yet something is not updated or something in the makefile (?) make sure that the makefile ... ### Complaints about step_override() git pull in lttoolbox (and do make, make install) You'll need an up-to-date version of lttoolbox and associated libraries, and zlib (debian: zlib1g-dev). ### Undefined symbol In your dictionary you are probably using a symbol that you didn't define in the sdefs. Add the symbol to the sdefs. ## Future work ### Offloading multiwords from transducers to lsx In theory we're offloading multiwords from the transducers to lsx. This leaves open some questions: - how do we do N N compounds with lsx? - how does translation *to* a multiword work? In theory it's possible to invert the transducer, but an attempt to try this results in a transducer that looks right but silently fails to apply to input. Also, it will need to be able to handle the output of transfer. —[Firespeaker](https://wiki.apertium.org/wiki/User:Firespeaker) ([talk](Uhttps://wiki.apertium.org/wiki/User_talk:Firespeaker)) 00:02, 1 September 2017 (CEST) ### Recycling dictionaries and/or paradigms lsx-dictionaries are packaged in language pairs. the eng-spa lsx-dictionary can mostly be reaped by eng-cat. could we make use of the similarity? ### Beta testing Support for language pairs: we haven't gotten much extensive beta testing. The following are language pairs that have packaged the lsx-module: - - eng-cat - eng-deu (?) - kaz-kir Beta test with more language pairs ### Transfer-like super powers - Transfer-like capabilities for the lexicon (super powers). E.g., gustar / ### The one-to-many bug Given the following lsx file: АӘБВГҒДЕЁЖЗИІЙКҚЛМНҢОӨПРСТУҰҮФХҺЦЧШЩЬЫЪЭЮЯаәбвгғдеёжзиійкқлмнңоөпрстуұүфхһцчшщьыъэюя

хабарет хабарет

абайбол абайбол

абайбол абайбол

+ма

суугатүш суутүш

and the following code to compile it (where `$(PREFIX1)` is kaz-kir and `$(PREFIX2)` is kir-kaz and `$(BASENAME)` is apertium-kaz-kir; the above file is apertium-kaz-kir.kir-kaz.lsx): $(PREFIX1).autoseq.bin: $(BASENAME).$(PREFIX1).lsx lsx-comp $< $@ $(PREFIX2).autoseq.bin: $(BASENAME).$(PREFIX2).lsx lsx-comp $< $@ $(PREFIX1).revautoseq.bin: $(BASENAME).$(PREFIX1).lsx lt-print $(PREFIX1).autoseq.bin | sed 's/ /@_SPACE_@/g' > $(PREFIX1).autoseq.att hfst-txt2fst -e ε < $(PREFIX1).autoseq.att > $(PREFIX1).autoseq.hfst hfst-invert $(PREFIX1).autoseq.hfst | hfst-minimise > $(PREFIX1).revautoseq.hfst hfst-fst2txt $(PREFIX1).revautoseq.hfst | gzip -9 -c -n > $(PREFIX1).revautoseq.att.gz zcat < $(PREFIX1).revautoseq.att.gz > $(PREFIX1).revautoseq.att sed 's/@0@/ε/g' $(PREFIX1).revautoseq.att > $(PREFIX1).revautoseq.1.att lt-comp lr $(PREFIX1).revautoseq.1.att $@ $(PREFIX2).revautoseq.bin: $(BASENAME).$(PREFIX2).lsx lt-print $(PREFIX2).autoseq.bin | sed 's/ /@_SPACE_@/g' > $(PREFIX2).autoseq.att hfst-txt2fst -e ε < $(PREFIX2).autoseq.att > $(PREFIX2).autoseq.hfst hfst-invert $(PREFIX2).autoseq.hfst | hfst-minimise > $(PREFIX2).revautoseq.hfst hfst-fst2txt $(PREFIX2).revautoseq.hfst | gzip -9 -c -n > $(PREFIX2).revautoseq.att.gz zcat < $(PREFIX2).revautoseq.att.gz > $(PREFIX2).revautoseq.att sed 's/@0@/ε/g' $(PREFIX2).revautoseq.att > $(PREFIX2).revautoseq.1.att lt-comp lr $(PREFIX2).revautoseq.1.att $@ EXPECTED OUTPUT: we expect lr compilation to give the following behaviour: $ echo "^хабар ет$" | lsx-proc kaz-kir.autoseq.bin ^хабар$ ^ет$ and $ echo "^хабар$ ^ет$" | lsx-proc kaz-kir.autoseq.bin ^хабар$ ^ет$ WHEREAS with rl compilation (outputting with name revautoseq), we expect the following behaviour: $ echo "^хабар$ ^ет$" | lsx-proc kaz-kir.revautoseq.bin ^хабар ет$ and $ echo "^хабар ет$" | lsx-proc kaz-kir.revautoseq.bin ^хабар ет$ ## See also - [Apertium system architecture](https://wiki.apertium.org/wiki/Apertium_system_architecture) - GSOC project [ proposal](https://wiki.apertium.org/wiki/User:Irene/proposal), [ workplan](https://wiki.apertium.org/wiki/User:Irene/workplan), [ report](https://wiki.apertium.org/wiki/Lsx_module/report) - [/GCI_2017](https://wiki.apertium.org/wiki/Apertium_separable/GCI_2017)

Owner

  • Name: Apertium
  • Login: apertium
  • Kind: organization
  • Email: apertium-contact@lists.sourceforge.net

Free/open-source platform for developing rule-based machine translation systems and language technology

GitHub Events

Total
  • Release event: 1
  • Create event: 1
Last Year
  • Release event: 1
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 277
  • Total Committers: 13
  • Avg Commits per committer: 21.308
  • Development Distribution Score (DDS): 0.56
Past Year
  • Commits: 3
  • Committers: 3
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.667
Top Committers
Name Email Commits
Irene Tang i****1@s****u 122
Francis M. Tyers f****s@p****m 73
Tino Didriksen m****l@t****m 21
Himanshu Sekhar Nayak h****1@g****m 20
Daniel Swanson p****e@g****m 10
Daniel Swanson a****s@g****m 9
Kevin Brubeck Unhammer u****r@f****g 7
Ethan Yang e****n@g****m 4
Tanmai Khanna k****i@g****m 4
Xavi Ivars x****s@g****m 3
Nick Howell n****l@g****m 2
Jonathan North Washington j****n@g****m 1
Nishant Mittal 3****p 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 37
  • Total pull requests: 14
  • Average time to close issues: 5 months
  • Average time to close pull requests: 20 days
  • Total issue authors: 11
  • Total pull request authors: 6
  • Average comments per issue: 4.54
  • Average comments per pull request: 0.5
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • unhammer (7)
  • ftyers (7)
  • jonorthwash (6)
  • TinoDidriksen (6)
  • hectoralos (4)
  • khannatanmai (2)
  • ApertiumBot (2)
  • dolphingarlic (1)
  • mr-martian (1)
  • sulivanShu (1)
  • bentley (1)
Pull Request Authors
  • mr-martian (7)
  • unhammer (3)
  • sandy9999 (1)
  • nishantwrp (1)
  • khannatanmai (1)
Top Labels
Issue Labels
bug (7) good first issue (3) enhancement (2) question (2) help wanted (1) invalid (1)
Pull Request Labels

Dependencies

.github/workflows/build.yaml actions
  • actions/checkout v3 composite