Skip to content

last-stand/language-translator

Repository files navigation

Language Translator

Description

Language translator translates English language sentences into Hindi but we can do the same thing for other languages as well. It uses javascript parser Jison for parsing English sentences and then convert it to Hindi sentences.

Settings to run project:

Run the npm install.

1. grammar.json :

In this file we have given context-free grammar. It is used to parse the input data described by that grammar.

2. lang_structure.json :

Here, we have described the possible sentence structures for different languages(here it is for Hindi & English).

3. en-hi-dictionary :

This is just a dictionary file where we have stored possible words in different languages.

4. lang_translater :

It takes as file with valid English sentences(here it is sampleText)in it and performs translation on it. To run this use the given command to the terminal:

node lang_translter.js sampleText

OR We can provide input from console.

node lang_translter.js 'Oggy eats fish. deer drinks water.'

Note: This application is tightly bound to its grammar, rules and language-structure provided to it. It is case sensitive as well.

About

Example of language-parser using Jison which parses given English sentences to translate into Hindi later.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors