Giter Site home page Giter Site logo

giellalt / lang-nob Goto Github PK

View Code? Open in Web Editor NEW
2.0 24.0 0.0 84.01 MB

Finite state and Constraint Grammar based analysers and proofing tools, and language resources for the Norwegian Bokmål language

Home Page: https://giellalt.uit.no

License: GNU General Public License v3.0

Makefile 1.72% Shell 2.41% M4 2.25% Ruby 1.05% Perl 0.27% XSLT 0.21% Regular Expression 0.84% XML 0.15% YAML 4.21% Text 86.89%
nlp language-resources constraint-grammar finite-state-transducers minority-language proofing-tools giellalt-langs maturity-prod geo-nordic langfam-indoeuropean

lang-nob's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lang-nob's Issues

Test procedure does not ignore lexicon

Here is the lexicon in stems/adjectives.lexc:

LEXICON AmountCont ! gives 10-sidet, 27-årig etc.
sidet a4 ;
språklig a2 ;
års a3 ;
åring m1 ;
årig a2 ;

I tried to add the textstreng AmountCont after each entry, but it did not work, and the test does not pass. The same goes for a similar set in propernouns.

Fails to build in docker unless locales are set

TL,DR: When building in Docker, at least from the ubuntu image, one has to set a different locale in order to get the compilation to not crash. I just tested with en_US.UTF-8, which makes compilation succeed. However, if this means that everything is as it should be, I do not know.

(Can a solution be to just document this behaviour in the "getting started" pages, or is there some underlying cause of this error that can be fixed, so that compiling the model does not require setting these environment variables?)

The required lines in the Dockerfile:

FROM ubuntu:20.04
RUN apt-get update
# required to install the locales
RUN apt-get install locales
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
# some part of the build process seems to be happy when LANG and LC_ALL is set as such:
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Oslo" LANG="en_US" LC_ALL="en_US.UTF-8"

# .... the rest of the Dockerfile

If you however have a Dockerfile without the locale stuff, but only consisting of instructions very similar to those found in https://giellalt.github.io/infra/GettingStarted.html, like this one...:

$ cat Dockerfile.nob.failing
FROM ubuntu:20.04
RUN apt-get update

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Oslo"

RUN apt-get -y install bc curl git autoconf automake cmake libtool wget antiword wv python3-pip python3-bs4 python3-lxml python3-html5lib python3-feedparser python3-yaml python3-tidylib

RUN curl https://apertium.projectjj.com/apt/install-nightly.sh | bash
RUN apt-get -yf install apertium-all-dev cg3 hfst

# giella-core
WORKDIR /giellalt
RUN git clone --depth 1 https://github.com/giellalt/giella-core
WORKDIR /giellalt/giella-core
RUN ./autogen.sh
RUN ./configure
RUN make -j

# shared-mul
WORKDIR /giellalt
RUN git clone --depth 1 https://github.com/giellalt/shared-mul

RUN git clone --depth 1 https://github.com/giellalt/lang-nob
WORKDIR /giellalt/lang-nob
RUN ./autogen.sh
RUN ./configure --enable-fst-hyphenator --enable-spellers --enable-tokenisers --enable-phonetic --enable-tts
RUN make -j

...Then, trying to build the image using this command...:

$ docker build . -f Dockerfile.nob -t lang-nob

...the process fails, with the following error lines printed before the process terminates:

  HRGX2FST spellrestrict-nfd2nfc.hfst
/usr/bin/hfst-regexp2fst: spellrestrict-nfd2nfc.regex: XRE parsing failed in expression #1 separated by semicolons
make[2]: *** [Makefile:885: spellrestrict-nfd2nfc.hfst] Error 1
make[2]: *** Deleting file 'spellrestrict-nfd2nfc.hfst'
make[2]: *** Waiting for unfinished jobs....
/usr/bin/hfst-regexp2fst: spellrelax-nfc2nfd.regex: XRE parsing failed in expression #1 separated by semicolons
make[2]: *** [Makefile:885: spellrelax-nfc2nfd.hfst] Error 1
make[2]: *** Deleting file 'spellrelax-nfc2nfd.hfst'
rm spellrelax-with-flagtags.hfst spellrelax-mobile-keyboard.hfst spellrelax-with-tags.hfst inituppercase.hfst spellrelax-tags.hfst allcaps.hfst downcase-derived_proper-strings.hfst spellrelax.hfst
make[2]: Leaving directory '/giellalt/lang-nob/src/orthography'
make[1]: *** [Makefile:1212: all-recursive] Error 1
make[1]: Leaving directory '/giellalt/lang-nob/src'
make: *** [Makefile:540: all-recursive] Error 1
The command '/bin/sh -c make -j' returned a non-zero code: 2

No analysis for ""

I get the following:

echo "" | hfst-tokenise --print-all --giella-cg --no-weights --unique tools/tokenisers/tokeniser-disamb-gt-desc.pmhfst | vislcg3 --grammar tools/tokenisers/mwe-dis.bin | cg-mwesplit | vislcg3 --grammar src/cg3/disambiguator.bin | vislcg3 --grammar src/cg3/functions.cg3 | vislcg3 --grammar src/cg3/dependency.bin
:\n

Merkeleg analyse av ACR-Prop

Sju akronym i fila nob-propernouns.lexc fører til at lemmagenereringstesten ikkje går gjennom (med kommentar om at dei ikkje skal vera med, men han funkar ikkje):

AKP PROP-org ;  ! not-lemmatest
AMI PROP-org ;  ! not-lemmatest
ANC PROP-org ;  ! not-lemmatest
ANSI PROP-org ; ! not-lemmatest
AOF PROP-org ;  ! not-lemmatest
AP PROP-org ;   ! not-lemmatest
AUF PROP-org ;  ! not-lemmatest

Når eg ser på analysen av dessa akronyma så er det større problem enn at dei ikkje går gjennom lemmatestinga:

echo ANSI | hfst-lookup -q src/analyser-gt-norm.hfstol
ANSI	ANSI+N+Prop+Sem/Org+ACR+N+Prop+ACR+Msc+Sg+Indef	0.000000
ANSI	ANSI+Use/Circ+Use/SpellNoSugg+N+Prop+Sem/Org+ACR+Dyn+Msc+Sg+Indef	0.000000

(den andre analysen er dynamisk, den kan ignorerast).

Analysen stemmer ikkje i det heile med LexC-koden:

LEXICON Root
   ProperNoun      ; !!≈ * @CODE@

LEXICON ProperNoun
 @U.CmpHyph.TRUE@ ProperNoun-nob-nocomp ;

LEXICON ProperNoun-nob-nocomp
AKP PROP-org ;  ! not-lemmatest
AMI PROP-org ;  ! not-lemmatest
ANC PROP-org ;  ! not-lemmatest
ANSI PROP-org ; ! not-lemmatest
AOF PROP-org ;  ! not-lemmatest
AP PROP-org ;   ! not-lemmatest
AUF PROP-org ;  ! not-lemmatest

LEXICON PROP-org
+N+Prop+Sem/Org: K ;

LEXICON K 
          ENDLEX ;

LEXICON ENDLEX
 @D.CmpOnly.FALSE@@D.CmpPref.TRUE@@D.NeedNoun.ON@ # ;

(kode direkte frå kjeldefilene, utan kommentarar og irrelevante stigar.)

Det er INGENTING i denne koden som kan gje den analysen vi faktisk får. Eg forstår ikkje dette, og det er samtidig dette som gjer at testane ikkje går gjennom. Med den venta analysen hadde det ikkje vore problem med lemmagenereringa.

Dates are not parsed correctly (nob) (

This issue was created automatically with bugzilla2github

Bugzilla Bug 2427

Date: 2017-09-27T14:10:44+02:00
From: Børre Gaup <<borre.gaup>>
To: Trond Trosterud <<trond.trosterud>>
CC: ciprian.gerstenberger, lene.antonsen

Blocker for: #2405
Last updated: 2017-10-04T16:44:47+02:00

No analysis for "†"

The symbol "†" doesn't get any analysis:

echo "†" | hfst-tokenise --print-all --giella-cg --no-weights --unique tools/tokenisers/tokeniser-disamb-gt-desc.pmhfst | vislcg3 --grammar tools/tokenisers/mwe-dis.bin | cg-mwesplit | vislcg3 --grammar src/cg3/disambiguator.bin | vislcg3 --grammar src/cg3/functions.cg3 | vislcg3 --grammar src/cg3/dependency.bin
:†\n

No analysis for "EØS‑regelverket"

I get the following:

echo "EØS‑regelverket" | hfst-tokenise --print-all --giella-cg --no-weights --unique tools/tokenisers/tokeniser-disamb-gt-desc.pmhfst | vislcg3 --grammar tools/tokenisers/mwe-dis.bin | cg-mwesplit | vislcg3 --grammar src/cg3/disambiguator.bin | vislcg3 --grammar src/cg3/functions.cg3 | vislcg3 --grammar src/cg3/dependency.bin
:EØS‑regelverket\n

./configure --enable-tokenisers causes make install to fail

Plain ./configure works

The error is:

make[3]: *** [Makefile:668: install-gielladataDATA] Error 1
make[3]: Leaving directory '/home/boerre/gut/giellalt/lang-nob/src/cg3'
make[2]: *** [Makefile:740: install-am] Error 2
make[2]: Leaving directory '/home/boerre/gut/giellalt/lang-nob/src/cg3'
make[1]: *** [Makefile:1176: install-recursive] Error 1
make[1]: Leaving directory '/home/boerre/gut/giellalt/lang-nob/src'
make: *** [Makefile:538: install-recursive] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.