P2O2 WWW Polish in NetBSD:
Handy Dictionaries from Infobases


Created - Apr 31, 2007  |  Modified - Sep 20, 2007

P2O2 WWW Homepage -> Polish in NetBSD -> Handy Dictionaries from Infobases


Setting Demands

  1. English-Polish/English Acronyms
  2. English-Polish/English Synonyms
  3. English-Polish/English Computer Expressions
  4. English-Polish Dictionary
  5. English-Polish Phrases

 

Important Remark

Dictionary Search Engines presented in this text can be applied to any language! Or any textual information.

 

Creating Infobases

First we must name our "search engines". They will be based on the famous "small" but powerful unix appies.

Small digression: for the purpose of the page I created neologism - appy (sl), and appies (pl). In simillar way to "son" and "sonny" (small boy). That way I obtained appy (as a small application), appies (as small applications). :-)

Name of the appies are in form of np_l{a|c|h|x|y}. They are part of The LearN@BSD Project, and its first incarnation LearN@BSD Newbie Primer. Symlink the scripts in ~/bin with shorter names: l{a|c|h|x|y}. They will be more handy if typing in terminal windows.

Second we have to have enough infobases to look thru.

LEGEND I: now it's time for short explanation of the language used on this page:
la - Locate Acronym
lc - Locate Computer (term)
lh - Locate pHrase
lx - Locate (in) leXicons and dictionaries
ly - Locate sYnonym
lnbsd - LearN@BSD infobase directory (~/lnbsd/)
np_l? - Newbie Primer Locate {A|C|H|Y} - scripts in ~/lnbsd/scripts/
l{a|c|h|y} - symlink names in ~/bin directory pointing to nb_l{a|c|h|y} scripts in ~/lnbsd/scripts/
@ - symlink character
appy - "small" app(lication)

LEGEND II: information ordered according to "search engines"

  1. English-Polish/English Acronyms
    Appy: np_la (symlink ~/bin/la)
    Infobases: ~/lnbsd/locate/la/@*

  2. English-Polish/English Synonyms
    Appy: np_lc (symlink ~/bin/lc)
    Infobases: ~/lnbsd/locate/lc/@*

  3. English-Polish/English Computer Expressions
    Appy: np_lh (symlink ~/bin/lh)
    Infobases: ~/lnbsd/locate/lh/@*

  4. English-Polish Dictionary
    Appy: np_lx (symlink ~/bin/lx)
    Infobases: ~/lnbsd/locate/lx/@*

  5. English-Polish Phrases
    Appy: np_ly (symlink ~/bin/ly)
    Infobases: ~/lnbsd/locate/ly/@*

IMPORTANT
The infobases are stored in ~/lnbsd/dict.db/ subdirectory scheme. Go over the tree. You can chose needed infobase and symlink it in one of ~/lnbsd/locate/ subdirectory. Such solution is extremely adaptable to user's demands.

 

Creating Search Engines

Powerful grep command is a "search engine" in itself. We use it together with another appy of "tr" (translator). Read the example code below and learn Bash scripting a little. I had to use "tr" to get rid of spaces. "$1" denotes first appy argument (grep xxxx - xxx will be the argument).

    if [ "$1" = "" ]; then
      echo "Search English-Polish Phrases"
      echo "================================"
      echo "usage:   np_lh word"
      echo "         np_lh ^word"
      echo "         np_lh \"^word\""
      echo "         np_lh \"word1 word2\""
      echo

      exit
    fi

    echo
    echo "Searching English-Polish Phrases"
    echo "==================================="
    echo
    echo "=== grep < "$1" > results:"
    echo

    i=1
    for result in $(grep -h "$1" ~/lnbsd/locate/lh/* | tr " " "|")
    do
      echo "["$i"] "$result | tr "|" " "
      echo
      i=$(($i+1))
    done
    echo
    

 

P2O2 Screenshots

[MC window with directory structure]

Picture 1: ~/lnbsd/ directory structure

 

[MC window with directory structure, another view]

Picture 2: ~/lnbsd/ directory structure, another view

 

[MC window with scripts and their symlinks]

Picture 3: ~/lnbsd/scripts/ scripts and their symlinks

 

[MC window with la example]

Picture 4: Running la example

 

[MC window with lc example]

Picture 5: Running lc example

 

[MC window with lh example]

Picture 6: Running lh example

 

[MC window with lx example]

Picture 7: Running lx example

 

[MC window with ly example]

Picture 8: Running ly example

 

Download Files

1.) lnbsd.dicts.tar.gz

 

[Logo P2O2]

 

[NetBSD Logo]

 

[NetBSD Wiki Logo]

 

[NetBSD.pl Logo]

 

[Logo Open Object Rexx]

 

[Powered by Rexx Logo]

 


Qlist_4Q   [Static website generated with Rexx scripts in NetBSD]