GithubHelp home page GithubHelp logo

pombredanne / juliafoma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dcavar/juliafoma

0.0 1.0 0.0 96 KB

Julia NLP with Foma: Finite State Transducer for Morphological Analysis

Home Page: http://damir.cavar.me/

License: MIT License

Julia 100.00%

juliafoma's Introduction

Julia Foma Interface

(C) 2018 by Damir Cavar

Version: 0.1

This is part of my Julia code and libs for Natural Language Processing (NLP). I am using Julia 1.0 or newer.

This is the beginning of an interface to the Foma library in Julia.

The code here is accompanied by an example morphology in form of a Foma Finite State Transducer.

english.fst

There are a few morphemes and words in this morphology, just for testing purposes.

Make sure that Foma is installed on your machine, and in particular the dynamic libraries. These libraries need to be in your system's library path such that Julia can find them.

This is an extremely fast morphological analyzer. This combination of Julia and Foma FST-based morphological analysis can process more than 300,000 tokens per second on modern Intel i7 CPUs on a single thread.

I will extend the library and functions soon.

Example

For any token that you process using the FST, the output will be of the form:

call+N+Pl
call+V+3P+Sg

This is the output for the input token "calls". The two lines mean that:

  • there are two analyses for calls
  • the lemma for calls is in both cases call
  • the main part of speech is N (noun) and V (verb)
  • the noun calls has a morphosyntactic feature +Pl (+plural)
  • the verb calls has two morphosyntactic features, that is +3P (third person) and Sg (singular)

Test some more examples using the compiled mini-morphology for English in english.fst.

juliafoma's People

Contributors

dcavar avatar

Watchers

 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.