Difference between revisions of "User:Gang Chen/GSoC 2013 Progress"
(119 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== GSOC 2013 == |
== GSOC 2013 == |
||
I |
I was working with Apertium for the GSoC 2013 (2013.06-2013.09), on the project "Sliding Window Part of Speech Tagger for Apertium". |
||
my proposal is here: [http://wiki.apertium.org/wiki/User:Gang_Chen/GSoC_2013_Application:_%22Sliding_Window_PoS_Tagger%22 Proposal] |
my proposal is here: [http://wiki.apertium.org/wiki/User:Gang_Chen/GSoC_2013_Application:_%22Sliding_Window_PoS_Tagger%22 Proposal] |
||
Line 9: | Line 9: | ||
2. en-es language pair(for experiment) https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es |
2. en-es language pair(for experiment) https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es |
||
3. es-ca language pair(for experiment) https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-es-ca |
|||
=== Usage === |
=== Usage === |
||
Line 14: | Line 16: | ||
<pre> |
<pre> |
||
HMM tagger usage: |
HMM tagger usage: |
||
apertium-tagger -t 8 es.dic es.crp apertium-en-es.es.tsx es-en.prob |
apertium-tagger -t 8 es.dic es.crp apertium-en-es.es.tsx es-en.prob.new |
||
apertium-tagger -g es-en.prob.new |
apertium-tagger -g es-en.prob.new |
||
LSW tagger usage: |
|||
apertium-tagger -w -t 8 es.dic es.crp apertium-en-es.es.tsx es-en.prob |
apertium-tagger -w -t 8 es.dic es.crp apertium-en-es.es.tsx es-en.prob.new |
||
apertium-tagger -w -g es-en.prob.new |
apertium-tagger -w -g es-en.prob.new |
||
</pre> |
</pre> |
||
Line 24: | Line 26: | ||
=== Tagging Experiments === |
=== Tagging Experiments === |
||
==== language ==== |
|||
es, in the language pair en-es, https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es |
|||
==== 1. run the whole training and evaluation pipeline ==== |
|||
==== test set ==== |
|||
To execute a whole training and evaluation procedure, please refer to these 2 scripts: |
|||
The hand-tagged 1200+ lines in the en-es package. |
|||
[https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es/es_step1_preprocess.sh apertium-en-es/es_step1_preprocess.sh] |
|||
25% of the words are ambiguous. |
|||
[https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es/es_step2_train_tag_eval.sh apertium-en-es/es_step2_train_tag_eval.sh] |
|||
==== training data ==== |
|||
Europal Spanish, 2 million lines. |
|||
==== evaluation ==== |
==== 2. evaluation scripts ==== |
||
In the en-es package, we have 2 tiny scripts |
In the apertium-swpost/apertium-xx-yy (e.g. apertium-en-es) package, we have 2 tiny scripts, that do the evaluation, and are called by es_step2_train_tag_eval.sh: |
||
[https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es/es-tagger-data/extract_word_pos.py apertium-en-es/es-tagger-data/extract_word_pos.py] |
|||
The scripts is a bit simple, but I think the trend it reveals is informative. |
|||
[https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es/es-tagger-data/eval.py apertium-en-es/es-tagger-data/eval.py] |
|||
==== whole procedure ==== |
|||
To execute a whole training and evaluation prodecure, please refer to thesse 2 scripts: apertium-en-es/step1_preporcess.sh and apertium-en-es/step2_train_tag_eval.sh |
|||
==== |
==== 3. Experimetal Results ==== |
||
===== 3.1 Language Pairs ===== |
|||
<pre> |
|||
Euroal Lines HMM(order 1) LSW(-1, +1) LSW(-2, -1, +1) |
|||
{| class="wikitable" border="1" |
|||
1 81.94 85.08 85.07 |
|||
|- |
|||
10 83.11 85.76 85.07 |
|||
! language |
|||
30 86.05 85.96 85.09 |
|||
! svn |
|||
100 87.03 86.15 85.17 |
|||
! training |
|||
300 87.78 86.52 85.12 |
|||
! test-set |
|||
1000 88.41 86.77 85.16 |
|||
|- |
|||
3000 88.75 86.85 85.25 |
|||
| es |
|||
10000 88.83 86.88 85.16 |
|||
| [https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es apertium-swpost/apertium-en-es] |
|||
30000 88.83 86.86 85.24 |
|||
| Europarl Spanish |
|||
100000 88.84 86.87 85.43 |
|||
| 1000+ lines, hand-tagged |
|||
300000 88.84 86.91 85.21 |
|||
|- |
|||
1000000 88.95 86.94 85.18 |
|||
| ca |
|||
</pre> |
|||
| [https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-es-ca apertium-swpost/apertium-es-ca] |
|||
| Catalan Wikipedia |
|||
| 1000+ lines, hand-tagged |
|||
|- |
|||
| en |
|||
| [https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es apertium-swpost/apertium-en-es] |
|||
| Europarl Spanish |
|||
| 1000+ lines, 80% automatically mapped from [http://www.coli.uni-saarland.de/~thorsten/tnt/ the TnT tagger], 20% by hand-tagging |
|||
|} |
|||
===== 3.2 System Precision ===== |
|||
[[File:LSW_tagger_lines_vs_system-precision_Spanish.png]] |
|||
[[File:LSW_tagger_lines_vs_system-precision_Catalan.png]] |
|||
[[File:LSW_tagger_lines_vs_system-precision_English.png]] |
|||
==== 4. Rules and CG ==== |
|||
===== 4.1 With or without Rules ===== |
|||
[[File:Spanish_SW_LSW_LSW-noRules.png]] |
|||
[[File:Catalan_SW_LSW_LSW-noRules.png]] |
|||
[[File:English_SW_LSW_LSW-noRules.png]] |
|||
===== 4.2 With or without CG ===== |
|||
* '''cgTrain''' means using CG for processing the training corpus (to reduce ambiguity). |
|||
* '''cgTag''' means using CG before the PoS tagger. |
|||
====== 4.2.1 Spanish ====== |
|||
[[File:ES-HMM-CG.png]] |
|||
[[File:ES-LSW-CG.png]] |
|||
====== 4.2.2 Catalan ====== |
|||
[[File:CA-HMM-CG.png]] |
|||
[[File:CA-LSW-CG.png]] |
|||
====== 4.2.3 English ====== |
|||
[[File:EN-HMM-CG.png]] |
|||
[[File:EN-LSW-CG.png]] |
|||
=== Week Plan and Progress=== |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!week |
|||
!date |
|||
!plans |
|||
!progress |
|||
|- |
|||
|''Week -2'' |
|||
|''06.01-06.08'' |
|||
|''Community Bonding'' |
|||
|''(1) Evaluation scripts (1st version) working for Recall precision and F1-score. <br/> (2) '''SW tagger (1st version) working.''' '' |
|||
|- |
|||
|''Week -1'' |
|||
|''06.09-06.16'' |
|||
|''Community Bonding'' |
|||
|''(1) LSW tagger (1st version) working, without rules.'' |
|||
|- |
|||
| |
|||
|- |
|||
|Week 01 |
|||
|06.17-06.23 |
|||
|Implement the unsupervised version of the algorithm. |
|||
|(1) LSW tagger working, without rules. <br/> (2) Check for and fix bugs. |
|||
|- |
|||
|Week 02 |
|||
|06.24-06.30 |
|||
|Implement the unsupervised version of the algorithm. |
|||
|(1) '''LSW tagger working, with rules.''' <br/> (2) Update evaluation scripts for unknown words. |
|||
|- |
|||
|Week 03 |
|||
|07.01-07.07 |
|||
|Store the probability data in a clever way, allowing reading and edition using linguistic knowledge. Test using linguistic edition. |
|||
|(1) Reconstruct tagger-data using inheritance. <br/> (2) Experiment on "How the iteration number affects the tagger performance?"(Conclusion: usually less than 8.) <br/> (3) Extract large corpus from Wikipedia for '''Spanish''' and '''Catalan''' for text amount experiments. |
|||
|- |
|||
|Week 04 |
|||
|07.08-07.14 |
|||
|Make tests, check for bugs, and documentation. |
|||
|(1) Refine LSW tagger code for efficiency. <br/> (2) Experiment on "How the text amount affects the tagger performance?" (Conclusion: usually 1000+ lines will be OK) <br/> (3) Make stability tests. |
|||
|- |
|||
| '''Deliverable #1''' |
|||
| |
|||
|'''A SWPoST that works with probabilities.''' |
|||
|- |
|||
|Week 05 |
|||
|07.15-07.21 |
|||
|Implement FORBID restrictions, using LSW. Using the same options and TSX file as the HMM tagger. |
|||
|(1) Refine LSW tagger code for efficiency. <br/> (2) Implement LSW tagger with different window sizes for Catalan and Spanish and experiment them with different amounts of text. (Conclusion: '''window -1,+1 works best of all'''). |
|||
|- |
|||
|Week 06 |
|||
|07.22-07.28 |
|||
|Implement FORBID restrictions, using LSW. Using the same options and TSX file as the HMM tagger. |
|||
|(1) Study the TnT tagger for preparing '''English''' tagged text. <br/> (2) Map tags between TnT tagger and LSW tagger. 6000 ambigous words were automatically mapped out of the total 8000. |
|||
|- |
|||
|Week 07 |
|||
|07.29-08.04 |
|||
|Implement ENFORCE restrictions, using LSW. Using the same options and TSX file as the HMM tagger. |
|||
|(1) Hand-tag the 2000 ambiguous words that were not mapped automatically. |
|||
|- |
|||
|Week 08 |
|||
|08.05-08.11 |
|||
|Make tests, check for bugs, and documentation. |
|||
|(1) Experiment different window settings and text amounts on English. (Conclusion: performance all increase, unlike Spanish and Catalan, which decrease under some settings.)<br/> (2) Experiment to randomize training text for Spanish. (Conclusion: behave very alike.) <br/> (3) Further study window -1,+1,+2. (very little improvement at the cost of increasing many parameters and memory usage.) |
|||
|- |
|||
|'''Deliverable #2''' |
|||
| |
|||
|'''A SWPoST that works with FORBID and ENFORCE restrictions.''' |
|||
|- |
|||
|Week 09 |
|||
|08.12-08.18 |
|||
|Implement the minimized FST version. |
|||
|(1) Experiment HMM and LSw tagger without rules <br/> (2) Learn about CG. |
|||
|- |
|||
|Week 10 |
|||
|08.19-08.25 |
|||
|Refine code. Optionally, implement the supervised version of the algorithm. |
|||
|(1) Experiment HMM and LSw tagger without rules <br/> (2) Experiment HMM and LSW tagger with CG. |
|||
|- |
|||
|Week 11 |
|||
|08.26-09.01 |
|||
|Make tests, check the code and documentation. Optionally, Study further possible improvements. |
|||
|(1) re-ran the experiments to check code and data. <br/> (2) Write the report, 1st version. |
|||
|- |
|||
|Week 12 |
|||
|09.02-09.08 |
|||
|Make tests, check the code and documentation. |
|||
|Documentation |
|||
|- |
|||
|'''Deliverable #3''' |
|||
| |
|||
|'''A full implementation of the SWPoST in Apertium.''' |
|||
|} |
|||
=== General Progress === |
=== General Progress === |
||
2013-09-23: Making test, checking for bugs, documentation. |
|||
2013-08-27: Experiment using CG with LSW tagger. |
|||
2013-08-20: Experiment HMM and LSW tagger without rules. |
|||
2013-08-09: Experiment different window settings and text amounts on English. |
|||
2013-08-01: Hand-tag the English words that were not automatically mapped from the TnT tagger. |
|||
2013-07-26: Map tags between TnT tagger and LSW tagger. |
|||
2013-07-17: Refine LSW tagger code for efficiency. |
|||
2013-07-06: Reconstruct tagger data using inheritance. Delete the intermedia SW tagger implementation. |
|||
2013-06-28: LSW tagger working, with rules. |
2013-06-28: LSW tagger working, with rules. |
||
Line 66: | Line 211: | ||
2013-06-20: LSW tagger working, without rules. |
2013-06-20: LSW tagger working, without rules. |
||
2013-06-11: SW tagger working. |
2013-06-11: SW tagger working. Evaluation scripts working. |
||
2013-05-30: Start. |
2013-05-30: Start. |
||
=== Detailed progress === |
=== Detailed progress === |
||
------------------------------------------------------------------------ |
|||
'''2013-09-23''' |
|||
1. Makint tests, checking for bugs, documentation. |
|||
2. Finished the report, 2nd, 3rd vertion. |
|||
------------------------------------------------------------------------ |
|||
'''2013-09-03''' |
|||
1. Finished the report, 1st version |
|||
------------------------------------------------------------------------ |
|||
'''2013-08-27''' |
|||
1. Finished experimenting HMM and LSW tagger without using rules. |
|||
2. Managed to use CG together with LSW tagger. |
|||
------------------------------------------------------------------------ |
|||
'''2013-08-09''' |
|||
1. Finished hand-tagging the English test set. |
|||
2. Experiment different window settings, and text amount on English. |
|||
3. Experiment to randomize training text for Spanish. |
|||
4. Further experiment the -1,+1,+2 window. |
|||
------------------------------------------------------------------------ |
|||
'''2013-08-01''' |
|||
1. Check the algorithm and analyse cases |
|||
2. Hand-tag the rest 20% ambiguous words that were not mapped automatically. |
|||
------------------------------------------------------------------------ |
|||
'''2013-07-26''' |
|||
1. Study the usage of the TnT tagger. |
|||
2. Study the relationship between tagset of the TnT tagger and that of the Apertium tagger. |
|||
3. Develop algorithms to do automatic mapping between the two tagsets, 80% of the ambiguous words are successfully mapped. |
|||
------------------------------------------------------------------------ |
|||
'''2013-07-15''' |
|||
1. Follow the training and tagging procedure step by step, using a small corpus of several sentences, so that parameters can be calculated by hand. |
|||
2. No significant bugs found during the training and tagging procedure. |
|||
------------------------------------------------------------------------ |
|||
'''2013-07-10''' |
|||
1. Managed to get the HMM-supervised running. |
|||
2. Do experiments with window +1+2, -1+1+2. The results show that the '''RIGHT contexts''' are more important than the left contexts. |
|||
------------------------------------------------------------------------ |
|||
'''2013-07-06''' |
|||
1. Reconstruct 'tagger_data' class, using INHERITANCE for HMM and LSW respectively. |
|||
2. Make relevant changes to the surroundings, including tagger, tsx_reader, hmm, lswpost, filter-ambiguity-class, apply-new-rules, read-words, etc. |
|||
3. DELETE the swpost tagger, which serves as an intermedia implementaion, replaced by the final lsw tagger, which works fine and could support rules. |
|||
------------------------------------------------------------------------ |
|||
'''2013-07-03''' |
|||
1. update evaluation scripts, putting the unknown words into consideration. Now the evaluation script can report Recall, Precision, and F1-Score. |
|||
2. experiment with different amounts of text for training the LSW tagger. |
|||
3. experiment with different window sizes for training the LSW tagger. |
|||
4. experiments show strange results. |
|||
5. checking implementation, in case of potential bugs. |
|||
------------------------------------------------------------------------ |
------------------------------------------------------------------------ |
Latest revision as of 08:43, 7 October 2013
Contents
GSOC 2013[edit]
I was working with Apertium for the GSoC 2013 (2013.06-2013.09), on the project "Sliding Window Part of Speech Tagger for Apertium".
my proposal is here: Proposal
SVN repo[edit]
1. the tagger https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium
2. en-es language pair(for experiment) https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-en-es
3. es-ca language pair(for experiment) https://svn.code.sf.net/p/apertium/svn/branches/apertium-swpost/apertium-es-ca
Usage[edit]
Command line[edit]
HMM tagger usage: apertium-tagger -t 8 es.dic es.crp apertium-en-es.es.tsx es-en.prob.new apertium-tagger -g es-en.prob.new LSW tagger usage: apertium-tagger -w -t 8 es.dic es.crp apertium-en-es.es.tsx es-en.prob.new apertium-tagger -w -g es-en.prob.new
Tagging Experiments[edit]
1. run the whole training and evaluation pipeline[edit]
To execute a whole training and evaluation procedure, please refer to these 2 scripts:
apertium-en-es/es_step1_preprocess.sh
apertium-en-es/es_step2_train_tag_eval.sh
2. evaluation scripts[edit]
In the apertium-swpost/apertium-xx-yy (e.g. apertium-en-es) package, we have 2 tiny scripts, that do the evaluation, and are called by es_step2_train_tag_eval.sh:
apertium-en-es/es-tagger-data/extract_word_pos.py
apertium-en-es/es-tagger-data/eval.py
3. Experimetal Results[edit]
3.1 Language Pairs[edit]
language | svn | training | test-set |
---|---|---|---|
es | apertium-swpost/apertium-en-es | Europarl Spanish | 1000+ lines, hand-tagged |
ca | apertium-swpost/apertium-es-ca | Catalan Wikipedia | 1000+ lines, hand-tagged |
en | apertium-swpost/apertium-en-es | Europarl Spanish | 1000+ lines, 80% automatically mapped from the TnT tagger, 20% by hand-tagging |
3.2 System Precision[edit]
4. Rules and CG[edit]
4.1 With or without Rules[edit]
4.2 With or without CG[edit]
- cgTrain means using CG for processing the training corpus (to reduce ambiguity).
- cgTag means using CG before the PoS tagger.
4.2.1 Spanish[edit]
4.2.2 Catalan[edit]
4.2.3 English[edit]
Week Plan and Progress[edit]
week | date | plans | progress |
---|---|---|---|
Week -2 | 06.01-06.08 | Community Bonding | (1) Evaluation scripts (1st version) working for Recall precision and F1-score. (2) SW tagger (1st version) working. |
Week -1 | 06.09-06.16 | Community Bonding | (1) LSW tagger (1st version) working, without rules. |
Week 01 | 06.17-06.23 | Implement the unsupervised version of the algorithm. | (1) LSW tagger working, without rules. (2) Check for and fix bugs. |
Week 02 | 06.24-06.30 | Implement the unsupervised version of the algorithm. | (1) LSW tagger working, with rules. (2) Update evaluation scripts for unknown words. |
Week 03 | 07.01-07.07 | Store the probability data in a clever way, allowing reading and edition using linguistic knowledge. Test using linguistic edition. | (1) Reconstruct tagger-data using inheritance. (2) Experiment on "How the iteration number affects the tagger performance?"(Conclusion: usually less than 8.) (3) Extract large corpus from Wikipedia for Spanish and Catalan for text amount experiments. |
Week 04 | 07.08-07.14 | Make tests, check for bugs, and documentation. | (1) Refine LSW tagger code for efficiency. (2) Experiment on "How the text amount affects the tagger performance?" (Conclusion: usually 1000+ lines will be OK) (3) Make stability tests. |
Deliverable #1 | A SWPoST that works with probabilities. | ||
Week 05 | 07.15-07.21 | Implement FORBID restrictions, using LSW. Using the same options and TSX file as the HMM tagger. | (1) Refine LSW tagger code for efficiency. (2) Implement LSW tagger with different window sizes for Catalan and Spanish and experiment them with different amounts of text. (Conclusion: window -1,+1 works best of all). |
Week 06 | 07.22-07.28 | Implement FORBID restrictions, using LSW. Using the same options and TSX file as the HMM tagger. | (1) Study the TnT tagger for preparing English tagged text. (2) Map tags between TnT tagger and LSW tagger. 6000 ambigous words were automatically mapped out of the total 8000. |
Week 07 | 07.29-08.04 | Implement ENFORCE restrictions, using LSW. Using the same options and TSX file as the HMM tagger. | (1) Hand-tag the 2000 ambiguous words that were not mapped automatically. |
Week 08 | 08.05-08.11 | Make tests, check for bugs, and documentation. | (1) Experiment different window settings and text amounts on English. (Conclusion: performance all increase, unlike Spanish and Catalan, which decrease under some settings.) (2) Experiment to randomize training text for Spanish. (Conclusion: behave very alike.) (3) Further study window -1,+1,+2. (very little improvement at the cost of increasing many parameters and memory usage.) |
Deliverable #2 | A SWPoST that works with FORBID and ENFORCE restrictions. | ||
Week 09 | 08.12-08.18 | Implement the minimized FST version. | (1) Experiment HMM and LSw tagger without rules (2) Learn about CG. |
Week 10 | 08.19-08.25 | Refine code. Optionally, implement the supervised version of the algorithm. | (1) Experiment HMM and LSw tagger without rules (2) Experiment HMM and LSW tagger with CG. |
Week 11 | 08.26-09.01 | Make tests, check the code and documentation. Optionally, Study further possible improvements. | (1) re-ran the experiments to check code and data. (2) Write the report, 1st version. |
Week 12 | 09.02-09.08 | Make tests, check the code and documentation. | Documentation |
Deliverable #3 | A full implementation of the SWPoST in Apertium. |
General Progress[edit]
2013-09-23: Making test, checking for bugs, documentation.
2013-08-27: Experiment using CG with LSW tagger.
2013-08-20: Experiment HMM and LSW tagger without rules.
2013-08-09: Experiment different window settings and text amounts on English.
2013-08-01: Hand-tag the English words that were not automatically mapped from the TnT tagger.
2013-07-26: Map tags between TnT tagger and LSW tagger.
2013-07-17: Refine LSW tagger code for efficiency.
2013-07-06: Reconstruct tagger data using inheritance. Delete the intermedia SW tagger implementation.
2013-06-28: LSW tagger working, with rules.
2013-06-20: LSW tagger working, without rules.
2013-06-11: SW tagger working. Evaluation scripts working.
2013-05-30: Start.
Detailed progress[edit]
2013-09-23
1. Makint tests, checking for bugs, documentation.
2. Finished the report, 2nd, 3rd vertion.
2013-09-03
1. Finished the report, 1st version
2013-08-27
1. Finished experimenting HMM and LSW tagger without using rules.
2. Managed to use CG together with LSW tagger.
2013-08-09
1. Finished hand-tagging the English test set.
2. Experiment different window settings, and text amount on English.
3. Experiment to randomize training text for Spanish.
4. Further experiment the -1,+1,+2 window.
2013-08-01
1. Check the algorithm and analyse cases
2. Hand-tag the rest 20% ambiguous words that were not mapped automatically.
2013-07-26
1. Study the usage of the TnT tagger.
2. Study the relationship between tagset of the TnT tagger and that of the Apertium tagger.
3. Develop algorithms to do automatic mapping between the two tagsets, 80% of the ambiguous words are successfully mapped.
2013-07-15
1. Follow the training and tagging procedure step by step, using a small corpus of several sentences, so that parameters can be calculated by hand.
2. No significant bugs found during the training and tagging procedure.
2013-07-10
1. Managed to get the HMM-supervised running.
2. Do experiments with window +1+2, -1+1+2. The results show that the RIGHT contexts are more important than the left contexts.
2013-07-06
1. Reconstruct 'tagger_data' class, using INHERITANCE for HMM and LSW respectively.
2. Make relevant changes to the surroundings, including tagger, tsx_reader, hmm, lswpost, filter-ambiguity-class, apply-new-rules, read-words, etc.
3. DELETE the swpost tagger, which serves as an intermedia implementaion, replaced by the final lsw tagger, which works fine and could support rules.
2013-07-03
1. update evaluation scripts, putting the unknown words into consideration. Now the evaluation script can report Recall, Precision, and F1-Score.
2. experiment with different amounts of text for training the LSW tagger.
3. experiment with different window sizes for training the LSW tagger.
4. experiments show strange results.
5. checking implementation, in case of potential bugs.
2013-06-28
1. add find_similar_ambiguity_class for the tagging procedure. So a new ambiguity class won't crash the tagger down.
2. bugfix to the normalize factor. This makes the things right, but no improvements are gained to the quality.
3. replace the SW tagger with the LSW tagger. So the "-w" option is owned by the LSW tagger.
2013-06-23
1. implement a light sliding-window tagger. This tagger is based on the SW tagger, with "parameter reduction" described in the 2005 paper.
2. add rule support for light-sw tagger. The rules help to improve the tagging quality.
2013-06-21
1. add ZERO define. Because there are some double comparisons, we need a relatively precise threshold.
2. bug fix for the initial procedure and iteration formula.
3. check function style so the new code is consistent to the existing code.
2013-06-20
1. use heap space for 3-dimensional parameters. This makes it possible to train successfully without manually setting the 'stack' environment.
2. add retrain() function for SW tagger. The logic of the SW tagger's retrain is the same as that of the HMM tagger. It append several iterations based on the current parameters.
3. bugfix, avoid '-nan' parameters.
4. the tagger_data write only non-ZERO values. This saves a lot of disk space, reducing the parameter file from 100M to 200k.
2013-06-19
1. add print_para_matrix() for debugging in SW tagger. This funciton only prints non-ZERO parameters in the 3d matrix.
2. add support for debug, EOS, and null_flush. This makes the tagger work stable when called by other programs.
2013-06-17
1. a deep follow into the morpho_stream class, and make sense its memembers and functions.
2. refine the reading procedure of the SW tagger, so that the procedure is simpler and more stable.
2013-06-13
1. fix a bug in tagging procedure, where the initial tag score should be -1 instead of 0.
2013-06-12
1. add option "-w" for sw tagger. The option "-w" is not a drop-in replacement to the current HMM tagger, but an extension. So the default tagger for Apertium will still be the HMM tagger. If the "-w" option is specified, the the SW tagger will be used.
2. add support for judging the end of morpho_stream.
3. The first working version is OK:)
2013-06-11
1. Fix the bug of last version, mainly because of the read() method in 'TSX reader'. The read and write methods in the tsx_reader and tagger_data are re-implemented, because they are different from those for the HMM.
2. Implement the compression part of the SW tagger probabilities. These parameters are stored in a 3-d array.
3. Doing some debugging on the HMM tagger, in order to see how a tagger should work togethor with the whole pipeline.
2013-06-10
1. Implement a basic version SW tagger. But there are bugs between them.
2. The training and tagging procedures strictly follow the 2004 paper.
2013-05-30
1. Start the project.