Skip to content

This is a translator program I built using Python that will take in a sentence in Japanese and translate the parts of the sentence into English and return an English translation.

Notifications You must be signed in to change notification settings

ashsProjects/Japanese-to-English-Translator

Repository files navigation

Japanese-to-English-Translator

This is a translator program I built using Python that will take in a sentence in Japanese and translate the parts of the sentence into English and return an English translation.

The original senetence is first split into various parts of speech using Japanese particles, which determines the transitivity of the verb if present and if a copula is present. Each part of speech is further broken down depending on the characters, length, conjugation, pairing, and use.

This program does utilise the googletrans library as making a translator is a near impossible task (even for Google), especially without the use of machine learning.

The main feature of the program is to take the individual parts of the sentence, translate it using a csv with common words in Japanese, match it to a part of speech in English, and return that to the user.

The files in the program are as follows: BasicWords.py -> Has multiple dictionaries and lists with conjugations, copulas, translations, adverbs, and adjectives CleanCommonDataset.ipynb -> Used to take the original, messy dataset of common Japanese words and clean it using Jupyter Notebooks common_japanese.csv -> A csv file cleaned from the original file that has japanese words along with their definitions and readings CreateJLPTDeck.py -> Used to scrape the jisho.org website and download the common dataset used in this program GoogleTranslate.py -> Used to translate the sentence from the user into English semi-accurately Main.py -> Main file for the program that initializes everything and calls all of the methods and variables Translate.py -> Stores various methods to help with the main method. Used extensively

Examples of the program with Japanese inputs: Transitive Sentences: With を and は: image With する verb: image With modifier in subject: image With modifier in object: image With の in subject: image Intransitive: With は and に: image With いる and に: image With 行く and に: image With modifier in location and に: image With の in location and に image With は and が: image With が and ある: image With modifier in object and が: image With の in subject and が: image Copula: With は: image With が: image With い-adjective: image With な-adjective: image With modifier in object: image With の in subject: image

These are just few examples of the translations. The program has its limitations as it only supports 5-6 particles and fairly basic N5 grammar. I hope to continue building onto the program.

About

This is a translator program I built using Python that will take in a sentence in Japanese and translate the parts of the sentence into English and return an English translation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published