en:new-words

Материал из Xgu.ru

Перейти к: навигация, поиск
In Russian: new-words (more details)
Words from the Wikipedia article Moscow
translation of a word from the article. There is a list of the sentences with the word from the article after the translation. To get a translation of a word you have to press K (shift k) at the word

new-words is a script which helps you to control your vocabulary and find unknown words in texts before you start to read them.

It is intended to be run in a console; the interactive part of the work is done by means of a text editor (vim by default).

It features:

  • Words frequency information about words in a text;
  • Users vocabulary control;
  • Support for several languages;
  • Dictionary software integration;
  • The ability to make notes for unknown words.


Содержание

[править] Installation

   wget http://xgu.ru/downloads/new-words.tar.gz
   tar xvfz new-words.tar.gz
   ./INSTALL

[править] First steps

First of all you have to give a program some information about your vocabularies for foreign languages (one or more). Let us say we learn Russian and French.

Find unknown words in a page from the Internet:

   $ new-words http://ru.wikipedia.org/wiki/Москва

Delete (dd) words, that you know. Save the result and quit the editor (:wq).

Repeat the same using several other pages:

   $ new-words http://ru.wikipedia.org/wiki/Киев
   $ new-words http://ru.wikipedia.org/wiki/Linux

Now new-words knows something about your Russian vocabulary.

You can do the same for other languages, e.g. for French:

   $ new-words http://fr.wikipedia.org/wiki/Paris
   $ new-words http://fr.wikipedia.org/wiki/Linux

You can change your vocabularies data in the directory ~/.new-words:

   $ ls -1 /home/igor/.new-words
   fr.txt
   ru.txt

The language of pages are automatically derived from URL for pages from Wikipedia. If you want, you can specify language manually (using -l key):

   $ new-words -l fr http://fr.wikipedia.org/wiki/Paris

[править] External dictionaries usage

There is a script ~/bin/en , that was created during installation.

This is an example of the script, which translates its command line parameters from one language to another. Script translates its arguments from English to Russian in this example, but you can specify any other dictionary in its code.

Also you can create links to the file to make it possible to use external dictionaries not only for English texts (en) but for texts in any other languages.

   $ cd ~/bin/
   $ ln en fr
   $ ln en ru

After that you should edit the file ~/bin/en and specify correct names of the dictionaries that have to be used to translate from the French and Russian language to the language you want.

You can use the dictionary wrapper from new-words: when you are in the editor working with your words, you can set a cursor at any word and press K (shift k). The dictionary wrapper will be run.

The wrappers' buffer will show you not only a translation of the word but sentences from the text which contain the word where the cursor were.

[править] Adding notes to the words

You can add additional notes to words which you can't remember. These notes will be automatically saved and restored when needed.

Notes are saved in the file ~/.new-words/notes-??.txt . Here the language code should be specified instead of ?? .

You can browse last notes with UNIX tail command:

   $ tail ~/.new-words/notes-ru.txt

[править] License

GPLv3

Источник — «http://5.9.243.178:81/wiki/en:new-words»