Difference between revisions of "Apertium-nno-nob/kjektåkunne"

From Apertium
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
== diff før og etter: ==
 
<pre>
 
<pre>
 
$ xzcat ~/corpora/nob/*ntb*.xz | head -100000 | apertium -d . nob-nno_e > 2019-09-30.before
 
$ xzcat ~/corpora/nob/*ntb*.xz | head -100000 | apertium -d . nob-nno_e > 2019-09-30.before
 
$ # hack hack hack
 
$ # hack hack hack
 
$ xzcat ~/corpora/nob/*ntb*.xz | head -100000 | apertium -d . nob-nno_e > 2019-09-30.after
 
$ xzcat ~/corpora/nob/*ntb*.xz | head -100000 | apertium -d . nob-nno_e > 2019-09-30.after
$ diff -u 2019-09-30.before 2019-09-30.after | dwdiff -c -u --diff-input
+
$ diff -U0 2019-09-30.before 2019-09-30.after | dwdiff -c -u
 
</pre>
 
</pre>
  +
Bruk <code>diff -U0 fil1 fil2 | dwdiff -u -c</code> der fil1 og fil2 er store (tusener av linjer), elles går det an å berre gjera
  +
<code>dwdiff -c -C0 fil1 fil2</code>
   
  +
(-U0 og -C0 betyr ingen kontekstlinjer; bruk -U1 for 1 linje kontekst til diff, eller -C1 for 1 linje kontekst til dwdiff)
pipeline:
 
  +
  +
ev. "cat ~/corpora/nob/*ntb*.txt" i staden for xzcat *xz
  +
  +
  +
== EDITOR for git ==
  +
  +
legg
  +
<pre>
  +
export EDITOR='/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'
  +
</pre>
  +
i ~/.bashrc ?
  +
  +
== pipelinen til nno-nob_e: ==
 
<pre>
 
<pre>
 
$ echo tulleord|apertium -d . nob-nno_e-morph
 
$ echo tulleord|apertium -d . nob-nno_e-morph
Line 20: Line 36:
 
</pre>
 
</pre>
   
  +
  +
  +
viss ord blir ukjend sjølv etter at du har lagt det inn i nob.dix kan det vera at det manglar frå nno-nob.dix:
  +
<pre>
  +
$ echo ordet |apertium -d ../apertium-nob nob-morph
  +
$ echo ordet |apertium -d . nno-nob_e-morph
  +
</pre>
  +
  +
== Finn regel med nummer 7 i t1x: ==
 
<pre>
 
<pre>
 
$ xmllint --xpath '//rule[7]' apertium-nno-nob.nob-nno.t1x
 
$ xmllint --xpath '//rule[7]' apertium-nno-nob.nob-nno.t1x
 
</pre>
 
</pre>
   
  +
pullap.sh:
 
  +
== pull alle mappene: ==
  +
legg
 
<pre>
 
<pre>
 
for d in ~/apertium/apertium-{nno-nob,nob,nno}; do ( cd "$d" && git pull; ); done
 
for d in ~/apertium/apertium-{nno-nob,nob,nno}; do ( cd "$d" && git pull; ); done
  +
</pre>
  +
i pull.sh, <code>chmod +x pull.sh</code> og <code>./pull.sh</code>
  +
  +
  +
== raskare kompilering: ==
  +
<pre>
  +
$ make -j e # kompiler alt som trengst i nno, nob og nno-nob, for pipelinen nob-nno_e
  +
$ make -j r # kompiler alt utanom ordbøkene for pipelinen nob-nno_e (dvs. kompiler berre transfer, cg, lrx)
 
</pre>
 
</pre>

Latest revision as of 08:02, 1 October 2019

diff før og etter:[edit]

$  xzcat ~/corpora/nob/*ntb*.xz | head -100000 | apertium -d . nob-nno_e > 2019-09-30.before
$ # hack hack hack 
$  xzcat ~/corpora/nob/*ntb*.xz | head -100000 | apertium -d . nob-nno_e > 2019-09-30.after
$ diff -U0 2019-09-30.before 2019-09-30.after | dwdiff -c -u

Bruk diff -U0 fil1 fil2 | dwdiff -u -c der fil1 og fil2 er store (tusener av linjer), elles går det an å berre gjera dwdiff -c -C0 fil1 fil2

(-U0 og -C0 betyr ingen kontekstlinjer; bruk -U1 for 1 linje kontekst til diff, eller -C1 for 1 linje kontekst til dwdiff)

ev. "cat ~/corpora/nob/*ntb*.txt" i staden for xzcat *xz


EDITOR for git[edit]

legg

export EDITOR='/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'

i ~/.bashrc ?

pipelinen til nno-nob_e:[edit]

$ echo tulleord|apertium -d . nob-nno_e-morph 
$ echo tulleord|apertium -d . nob-nno_e-disam
$ echo tulleord|apertium -d . nob-nno_e-tagger
$ echo tulleord|apertium -d . nob-nno_e-pretransfer
$ echo tulleord|apertium -d . nob-nno_e-biltrans    
$ echo tulleord|apertium -d . nob-nno_e-lex    
$ echo tulleord|apertium -d . nob-nno_e-chunker
$ echo tulleord|apertium -d . nob-nno_e-interchunk
$ echo tulleord|apertium -d . nob-nno_e-postchunk
$ echo tulleord|apertium -d . nob-nno_e-dgen


viss ord blir ukjend sjølv etter at du har lagt det inn i nob.dix kan det vera at det manglar frå nno-nob.dix:

$ echo ordet |apertium -d ../apertium-nob nob-morph
$ echo ordet |apertium -d . nno-nob_e-morph

Finn regel med nummer 7 i t1x:[edit]

$ xmllint --xpath '//rule[7]'  apertium-nno-nob.nob-nno.t1x 


pull alle mappene:[edit]

legg

for d in ~/apertium/apertium-{nno-nob,nob,nno}; do ( cd "$d" && git pull; ); done

i pull.sh, chmod +x pull.sh og ./pull.sh


raskare kompilering:[edit]

$ make -j e  # kompiler alt som trengst i nno, nob og nno-nob, for pipelinen nob-nno_e
$ make -j r  # kompiler alt utanom ordbøkene for pipelinen nob-nno_e (dvs. kompiler berre transfer, cg, lrx)