Coder Social home page Coder Social logo

non_models_cltk's Introduction

CLTK models for Old Norse

Trained taggers for the CLTK.

POS tagging

Choice of the corpora

Texts already annotated by researchers were selected because they were in Old Norse written from XII to XIV centuries, the Golden Age of Old Norse texts : `Icelandic Parsed Historical Corpus (version 0.9, license: LGPL) Paths to annotated texts are made as you can see below:

    >>> selected_files = ["1150.firstgrammar.sci-lin.tagged", "1150.homiliubok.rel-ser.tagged",
                      "1210.jartein.rel-sag.tagged", "1210.thorlakur.rel-sag.tagged",
                      "1250.sturlunga.nar-sag.tagged", "1250.thetubrot.nar-sag.tagged",
                      "1260.jomsvikingar.nar-sag.tagged", "1270.gragas.law-law.tagged",
                      "1275.morkin.nar-his.tagged", "1300.alexander.nar-sag.tagged",
                      "1310.grettir.nar-sag.tagged", "1325.arni.nar-sag.tagged",
                      "1350.bandamennM.nar-sag.tagged", "1350.finnbogi.nar-sag.tagged",
                      '1350.marta.rel-sag.tagged']
    >>> selected_data = ["icepahc-v0.9/tagged/"+selected_file for selected_file in selected_files]

Extraction of words and tags

    >>> words_tags = []
    >>> for filename in selected_data:
             words_tags.extend(extract_word_and_tags(filename))

The function extract_word_and_tags gets a filename as input and returns the list of (word, tag) of the whole text. Sentences were not segmented so the POS tagger is not trained completely correctly. However, it does the work.

Taggers trained with TnT

    >>> tagger = tnt.TnT()
    >>> tagger.train(words_tags)
    >>> with open(os.path.join("taggers", "pos", "tnt.pickle"), "wb") as f:
             mpck = pickle.Pickler(f)
             mpck.dump(tagger)

The model data of the TnT can be retrieved thanks to the pickle module.

Tagset

http://nlp.cs.ru.is/pdf/Tagset.pdf

Complete description of the used corpus

http://www.linguist.is/icelandic_treebank/Icelandic_Parsed_Historical_Corpus_(IcePaHC)

non_models_cltk's People

Contributors

clemsciences avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.