Popularity
0.7
Stable
Activity
0.0
Stable
9
2
6

Description

machine-translator is a nodejs module that uses statistical machine translation to translate between two different languages. The module is loosely based off of the IBM model 1 algorithm and has been tested using English to German.

Code Quality Rank: L5
Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Latest version: v0.8.3

machine-translator alternatives and similar modules

Based on the "Natural Language Processing" category.
Alternatively, view machine-translator alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of machine-translator or a related project?

Add another 'Natural Language Processing' Module

README

travis build Codecov version license semantic-release Commitizen friendly

machine-translator

is a nodejs module that uses statistical machine translation to translate between two different languages. the module is loosely based off of the IBM model 1 algorithm and has been tested using english.

Install:

$ npm install machine-translator

Usage:

This module requires:

  1. A native corpus of text (i.e. english text file)
  2. A matching foreign corpus of text (i.e. german text file)

Example

var Translator = require('machine-translator');

var t = new Translator();

t.train('./tests/data/shortEN.txt', './tests/data/shortDE.txt');

t.translate('cat'); // { die: 0.5, Katze: 0.5 }
t.translate('the'); // { der: 0.2, Hund: 0.2, die: 0.2, Katze: 0.2, Bus: 0.2 }
t.translate('car'); // Error: No matches found!

NPM Commands

We have some NPM commands to help testing/linting:

npm run test:watch

npm run lint

npm run lint:watch
# lint in watch mode

npm run compile
# important!! needs to be run before release, note how main script points to dist instead of src

License:

MIT License 2015-2018 © Andy Craze & Contributors


*Note that all licence references and agreements mentioned in the machine-translator README section above are relevant to that project's source code only.