Difference between revisions of "Shallow syntactic function labeller"

From Apertium
Jump to navigation Jump to search
Line 5: Line 5:
 
A workplan and progress notes can be found here: [[Shallow syntactic function labeller/Workplan]]
 
A workplan and progress notes can be found here: [[Shallow syntactic function labeller/Workplan]]
   
== Installation ==
+
== Prerequisites ==
  +
1. Python libraries:
'''NB:''' Currently only the test version for sme-nob pair is available.
 
  +
* DyNet (installation instructions can be found here: http://dynet.readthedocs.io/en/latest/python.html)
  +
* Streamparser (https://github.com/goavki/streamparser)
   
  +
2. Precompiled language pairs which support the labeller (sme-nob)
Everything for installation and testing is stored here: https://github.com/deltamachine/shallow_syntactic_function_labeller/tree/master/sme-nob_testpack
 
   
=== Prerequisites ===
+
== Installation ==
 
'''Currently only the test version for sme-nob pair is available.'''
   
=== Instructions for installing ===
 
 
<pre>
 
<pre>
 
git clone https://github.com/deltamachine/sme-nob_testpack.git
 
git clone https://github.com/deltamachine/sme-nob_testpack.git
Line 26: Line 28:
 
* ''type_of_change:'' '''-lb''' for using the labeller in the pipeline, '''-cg''' for using the original syntax module (sme-nob.syn.rlx.bin) in the pipeline.
 
* ''type_of_change:'' '''-lb''' for using the labeller in the pipeline, '''-cg''' for using the original syntax module (sme-nob.syn.rlx.bin) in the pipeline.
   
  +
  +
For example, this script will install the labeller and add it to the pipeline:
 
<pre>
 
<pre>
 
python add_labeller.py /home/user/apertium/apertium-sme-nob /home/user/anaconda3/bin/python -install -lb
 
python add_labeller.py /home/user/apertium/apertium-sme-nob /home/user/anaconda3/bin/python -install -lb
  +
</pre>
  +
  +
And this script will backward modes changes:
  +
<pre>
  +
python add_labeller.py /home/user/apertium/apertium-sme-nob /home/user/anaconda3/bin/python -change -cg
 
</pre>
 
</pre>
   

Revision as of 10:29, 14 August 2017

This is Google Summer of Code 2017 project

A repository for the whole project: https://github.com/deltamachine/shallow_syntactic_function_labeller

A workplan and progress notes can be found here: Shallow syntactic function labeller/Workplan

Prerequisites

1. Python libraries:

2. Precompiled language pairs which support the labeller (sme-nob)

Installation

Currently only the test version for sme-nob pair is available.

git clone https://github.com/deltamachine/sme-nob_testpack.git
cd sme-nob_testpack

Script add_labeller.py adds all the needed files in apertium-sme-nob directory and changes all files with modes.

Arguments:

  • apertium_path: path to your apertium-sme-nob directory
  • python_path: path to current Python interpreteur (NB: if you just type "python" instead of full path, some dependencies might not work)
  • install_mode: -install for installing the labeller and changing modes, -change for just changing modes.
  • type_of_change: -lb for using the labeller in the pipeline, -cg for using the original syntax module (sme-nob.syn.rlx.bin) in the pipeline.


For example, this script will install the labeller and add it to the pipeline:

python add_labeller.py /home/user/apertium/apertium-sme-nob /home/user/anaconda3/bin/python -install -lb

And this script will backward modes changes:

python add_labeller.py /home/user/apertium/apertium-sme-nob /home/user/anaconda3/bin/python -change -cg

To do

  • Add an ability to handle more than one sentence.
  • Do more tests. MORE.
  • Write docstrings and refactore the main code.
  • Take the trash out of the github repository before the final evaluation.
  • Continue improving the perfomance of the models.