Skip to content

To generate glossary from any english text with translation to russian

Notifications You must be signed in to change notification settings

artkostm/glossary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glossary

To generate glossary from any english text with translation to russian.

A few simple steps to have fun:

  • Create API key: https://tech.yandex.com/keys/?service=dict (notice that there is a limit: 10000 request per day)
  • In order to avoid unintentional key sharing, do as follows:
    export DICT_API_KEY=<api_key_value>
    If it doesn't work for you: in the root project directory, just create file with name key and place the api key into it.
  • Create a file with name text.txt and copy & past your text that you want to be "glossaried".
  • Run script using sbt: sbt "runMain EntryPoint" (or in any other way you like).
  • After a few seconds you can see a file with glossary.xlsx name in the root directory.
  • Open generated file via Exel and sort lines by the first (A) cell.

Additional info:

"adjective" => "adj."
"noun" => "n."
"verb" => "v."
"adverb" => "adv."
"participle" => "p."
"pronoun" => "pron."
"conjunction" => "conj."
"preposition" => "prep."
"numeral" => "num."