9 oktober 2019

Taken:

  1. partok
    • nieuwe versie: partok.go en tokenize.sh
    • helptekst: metadata noemen
    • optie: commentaren niet speciaal behandelen
    • optie: labels niet speciaal behandelen
    • optie: metadata niet speciaal behandelen
    • optie: escape-codes voor Alpino niet speciaal behandelen
    • templatecodes: byte-positie, regel, kolom
      • html-entities
        • zie beneden
      • mismatch aan eind van de regel
  2. PaQu
    • nieuwe versie van corpus wablieft, versie 1.2, invoeren
    • tgrep2 bekijken als optie voor PaQu
      • zie beneden
  3. alud
    • cookbook
    • functies mogen geen panic doen als het resultaat in een test gebruikt wordt of optioneel is
    • geen eindeloze loops in fixMisplacedHeadsInCoordination()
  4. Alpino op github
    • met complete history op github: quotum overschreden
      • van svn naar git met history: /net/aistaff/kleiweg/Alpino.backup
      • history zeer groot door vele updates van complete treebanks
    • eigen gitserver op urd2 ?
    • hosten op https://git.webhosting.rug.nl/ ?
  5. Nieuw beleid van Twitter
  6. Website Alfa-informatica
    • tekst over geschiedenis van Alfa-informatica
    • foto’s

En verder, misschien…

  1. Urd
  2. alud
    • validatie als optie → waarschuwingen

partok

Waarom deze ‘foute’ entities in Tokenization/Create/entities.pl?

in uit correct
é
ä
ˆ ê ˆ
ˇ niks ˇ
ĝ ge ĝ

Alternatief:

#!/usr/bin/env python3

import html, sys

for line in sys.stdin.buffer:
    sys.stdout.buffer.write(html.unescape(line.decode('utf-8', 'ignore')).encode('utf-8', 'ignore'))

tgrep2

Code: https://github.com/andreasvc/disco-dop/blob/master/discodop/treesearch.py

Docs: https://discodop.readthedocs.io/en/latest/cli/treesearch.html#tgrep2-syntax-overview

Alle code:

Voorbeeld:

cd /var/tmp/lassyconv
discodop treesearch -e tgrep2 --csv -c '/^VNW\[p[re]/ < /^([Mm]ij|[Jj]ij|[Jj]ou|[Zz]ij|[Ww]ij|[Hh]en|[Hh]un)$/' */*.split.mrg.zst > ~/tmp/lassybig_strong.csv
discodop treesearch -e tgrep2 --csv -c '/^VNW\[p[re]/ < /^([Mm]e|[Jj]e|[Zz]e|[Ww]e)$/' */*.split.mrg.zst > ~/tmp/lassybig_weak.csv

Tijdvergelijking met alle invoerbestanden op lokale schijf:

$ time discodop treesearch -e tgrep2 --csv -c '/^VNW\[p[re]/ < /^([Mm]e|[Jj]e|[Zz]e|[Ww]e)$/' EINDHOVEN/*.split.mrg.zst
filename,/^VNW\[p[re]/ < /^([Mm]e|[Jj]e|[Zz]e|[Ww]e)$/
EINDHOVEN/gbl.split.mrg.zst,1991
EINDHOVEN/cdb.split.mrg.zst,653
EINDHOVEN/pwe.split.mrg.zst,622
EINDHOVEN/rno.split.mrg.zst,3387
EINDHOVEN/obl.split.mrg.zst,1098

real    0m0,245s
user    0m0,448s
sys     0m0,285s

# 1991 + 653 + 622 + 3387 + 1098 = 7751


$ time dbxml_match eindhoven.dact '//node[matches(@postag, "^VNW\(p[re]") and matches(@word, "^([Mm]e|[Jj]e|[Zz]e|[Ww]e)$")]' | wc -l
7750

real    0m23,632s
user    0m23,674s
sys     0m0,213s


$ time dbxml_match eindhoven.dact '//node[@lemma=("me","je","ze","we") and matches(@postag, "^VNW\(p[re]")]' | wc -l
7754

real    0m4,661s
user    0m4,660s
sys     0m0,230s

Voorbeeld van zin in tgrep2(?)-formaat:

(TOP
 (SMAIN
  (INF-vc*0
   (INF-vc*0
    (INF-vc*0
     (VNW[aanw,pron,stan,vol,3o,ev]-obj1 Dat))))
  (WW[pv,verl,ev]-hd zou)
  (VNW[pers,pron,nomin,red,2v,ev]-su je)
  (INF-vc*1
   (INF-vc*1
    (INF-vc*1
     (BW[]-mod dan)
     (PP-ld*0
      (VZ[init]-hd in)
      (NP-obj1*0
       (LID[onbep,stan,agr]-det een)
       (N[soort,ev,basis,zijd,stan]-hd fabriek)))))
   (WW[inf,vrij,zonder]-hd moeten)
   (INF-vc*2
    (WW[inf,vrij,zonder]-hd kunnen)
    (INF-vc*2
     (WW[inf,vrij,zonder]-hd schuiven)
     (PP-ld*1
      (NP-obj1*1
       (REL-mod
    (VNW[betr,pron,stan,vol,persoon,getal]-rhd die)
    (SSUB-body
     (VNW[aanw,pron,stan,vol,3o,ev]-obj1 dat)
     (BW[]-predm allemaal)
     (WW[pv,tgw,met-t]-hd afwerkt)))))))))
 (LET[] .))
                                                                                                                                 TOP     
                                                                                                                   ┌──────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
                                                                                                                 SMAIN                                                                                                                          │
       ┌────────────────┬────────────────┬─────────────────────────────────────────────────────────────────────────┴───────────────────────────┐                                                                                                │
       │                │                │                                                                                                  INF-vc*1                                                                                            │
       │                │                │                                 ┌──────────────────────────────────────────────────────┬────────────┴────────────────────────────┐                                                                   │
       │                │                │                                 │                                                      │                                      INF-vc*2                                                               │
       │                │                │                                 │                                                      │            ┌────────────────────────────┴────────────────┐                                                  │
       │                │                │                                 │                                                      │            │                                          INF-vc*2                                              │
       │                │                │                                 │                                                      │            │            ┌────────────────────────────────┴─────────────┐                                    │
       │                │                │                              INF-vc*1                                                  │            │            │                                           PP-ld*1                                 │
       │                │                │                                 │                                                      │            │            │                                              │                                    │
    INF-vc*0            │                │                              INF-vc*1                                                  │            │            │                                          NP-obj1*1                                │
       │                │                │            ┌────────────────────┴────────────┐                                         │            │            │                                              │                                    │
    INF-vc*0            │                │            │                              PP-ld*0                                      │            │            │                                           REL-mod                                 │
       │                │                │            │          ┌──────────────────────┴────────────┐                            │            │            │               ┌──────────────────────────────┴─────────┐                          │
    INF-vc*0            │                │            │          │                               NP-obj1*0                        │            │            │               │                                    SSUB-body                      │
       │                │                │            │          │                      ┌────────────┴─────────────┐              │            │            │               │                ┌───────────────────────┼──────────────┐           │
 VNW[aanw,pron,  WW[pv,verl,ev]-   VNW[pers,pron,  BW[]-mod VZ[init]-hd          LID[onbep,stan,           N[soort,ev,basis, WW[inf,vrij, WW[inf,vrij, WW[inf,vrij,   VNW[betr,pron,   VNW[aanw,pron,            BW[]-predm WW[pv,tgw,met-t]- LET[]
stan,vol,3o,ev]-        hd       nomin,red,2v,ev]-    │          │                   agr]-det                zijd,stan]-hd    zonder]-hd   zonder]-hd   zonder]-hd  stan,vol,persoon, stan,vol,3o,ev]-        hd             obj1              su           │          │                      │                          │              │            │            │           getal]-rhd          obj1                     │              │           │
       │                │                │            │          │                      │                          │              │            │            │               │                │                       │              │           │
      Dat              zou               je          dan         in                    een                      fabriek         moeten       kunnen      schuiven          die              dat                   allemaal       afwerkt        .  

Vergelijk met Alpino-boom.

git paqu partok svn tgrep2 twitter universal dependencies