Giter Site home page Giter Site logo

dcavar / fomatestcpp Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 101 KB

Foma-based morphological analysis using a simple C++ wrapper

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

License: Apache License 2.0

CMake 35.39% C++ 64.61%
cpp foma morphology finite-state-transducer nlp nlp-parsing lexicon natural-language-processing

fomatestcpp's Introduction

Foma example codes

Copyright 2015-2018 by Damir Cavar

Last edited: 2018-08-06, Damir Cavar

Includes and Libraries

You will need Foma and all its include and library files on your system to be able to compile this test code.

Included is a simplified and reduced English morphology compiled into a Finite State Transducer for the use with Foma.

Build the binary

To compile this example, you need to have the entire Foma collection of binaries, includes and libraries set up on your system. You will also need some C++11 compiler and various other libraries for it, for example the Boost libraries.

The project is a CMake project. Make sure that you have also CMake installed and set up on your system.

To create the running binary for the code in FomaMWT, in the folder run:

cmake CMakeList.txt

This will generate the Makefile and other files in the same folder. Run:

make

and it should compile correctly, if all the paths and folders are OK, and if the libraries were found.

If you want to test the speed of the processor, run the following command:

time ./fomatest test.txt > res.txt

Create a larger list of words in a text file and run it through the test tool. On an Intel i7 CPU with Fedora Linux I achieve something in the range of 300,000 tokens per second, with average number of ambiguous morphological analyses for each string.

fomatestcpp's People

Contributors

dcavar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pombredanne

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.