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
- English-Polish/English Acronyms
- English-Polish/English Synonyms
- English-Polish/English Computer Expressions
- English-Polish Dictionary
- 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"
-
English-Polish/English Acronyms
Appy: np_la (symlink ~/bin/la)
Infobases: ~/lnbsd/locate/la/@*
-
English-Polish/English Synonyms
Appy: np_lc (symlink ~/bin/lc)
Infobases: ~/lnbsd/locate/lc/@*
-
English-Polish/English Computer Expressions
Appy: np_lh (symlink ~/bin/lh)
Infobases: ~/lnbsd/locate/lh/@*
-
English-Polish Dictionary
Appy: np_lx (symlink ~/bin/lx)
Infobases: ~/lnbsd/locate/lx/@*
-
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
Picture 1: ~/lnbsd/ directory structure
Picture 2: ~/lnbsd/ directory structure, another view
Picture 3: ~/lnbsd/scripts/ scripts and their symlinks
Picture 4: Running la example
Picture 5: Running lc example
Picture 6: Running lh example
Picture 7: Running lx example
Picture 8: Running ly example
Download Files
1.) lnbsd.dicts.tar.gz
|