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.
Run the npm install.
In this file we have given context-free grammar. It is used to parse the input data described by that grammar.
Here, we have described the possible sentence structures for different languages(here it is for Hindi & English).
This is just a dictionary file where we have stored possible words in different languages.
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.