PB-dict-dictionary - now with 76 databases (translation etc)

Programs intended to teach, or to help one learn or study a specific subject - this includes educational games.
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

PB-dict-dictionary - now with 76 databases (translation etc)

#1 Post by MU »

Image

Download (6 kb):
http://dotpups.de/dotpups/Office/multi-pbdict.pup
mirror:
http://puppyfiles.ca/dotpupsde/dotpups/ ... pbdict.pup

It replaces Puppys already existing PB-dict, so you can start it from Puppys menu (Text-tools).

Simply choose one online-database from the list.

You can translate whole sentences word by word (which does not translate the grammar).
Example:
Er war gestern in der Schule
Result:
he
was
yesterday
at, chunkily, in, into, on
the, which, who
school, schoolhouse


Correct english would be something like
He was at school yesterday.

These are available at moment:
gcide The Collaborative International Dictionary of English v.0.48
wn WordNet (r) 2.0
moby-thes Moby Thesaurus II by Grady Ward, 1.0
elements Elements database 20001107
vera Virtual Entity of Relevant Acronyms (Version 1.9, June 2002)
jargon Jargon File (4.3.1, 29 Jun 2001)
foldoc The Free On-line Dictionary of Computing (27 SEP 03)
easton Easton's 1897 Bible Dictionary
hitchcock Hitchcock's Bible Names Dictionary (late 1800's)
bouvier Bouvier's Law Dictionary, Revised 6th Ed (1856)
devils THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)
world02 CIA World Factbook 2002
gazetteer U.S. Gazetteer (1990)
gaz-county U.S. Gazetteer Counties (2000)
gaz-place U.S. Gazetteer Places (2000)
gaz-zip U.S. Gazetteer Zip Code Tabulation Areas (2000)
afr-deu Africaan-German Freedict dictionary
afr-eng Africaan-English Freedict Dictionary
ara-eng English-Arabic Freedict Dictionary
cro-eng Croatian-English Freedict Dictionary
cze-eng Czech-English Freedict dictionary
dan-eng Danish-English Freedict dictionary
deu-eng German-English Freedict dictionary
deu-fra German-French Freedict dictionary
deu-ita German-Italian Freedict dictionary
deu-nld German-Nederland Freedict dictionary
deu-por German-Portugese Freedict dictionary
eng-afr English-Africaan Freedict Dictionary
eng-ara English-Arabic FreeDict Dictionary
eng-cro English-Croatian Freedict Dictionary
eng-cze English-Czech fdicts/FreeDict Dictionary
eng-deu English-German Freedict dictionary
eng-fra English-French Freedict Dictionary
eng-hin English-Hindi Freedict Dictionary
eng-hun English-Hungarian Freedict Dictionary
eng-iri English-Irish Freedict dictionary
eng-ita English-Italian Freedict dictionary
eng-lat English-Latin Freedict dictionary
eng-nld English-Netherlands Freedict dictionary
eng-por English-Portugese Freedict dictionary
eng-rom English-Romanian FreeDict dictionary
eng-rus English-Russian Freedict dictionary
eng-spa English-Spanish Freedict dictionary
eng-swa English-Swahili xFried/FreeDict Dictionary
eng-swe English-Swedish Freedict dictionary
eng-tur English-Turkish FreeDict Dictionary
eng-wel English-Welsh Freedict dictionary
fra-deu French-German Freedict dictionary
fra-eng French-English Freedict dictionary
fra-nld French-Nederlands Freedict dictionary
hin-eng English-Hindi Freedict Dictionary [reverse index]
hun-eng Hungarian-English FreeDict Dictionary
iri-eng Irish-English Freedict dictionary
ita-deu Italian-German Freedict dictionary
jpn-deu Japanese-German Freedict dictionary
kha-deu Khasi-German FreeDict Dictionary
lat-deu Latin-German Freedict dictionary
lat-eng Latin-English Freedict dictionary
nld-deu Nederlands-German Freedict dictionary
nld-eng Nederlands-English Freedict dictionary
nld-fra Nederlands-French Freedict dictionary
por-deu Portugese-German Freedict dictionary
por-eng Portugese-English Freedict dictionary
sco-deu Scottish-German Freedict dictionary
scr-eng Serbo-Croat-English Freedict dictionary
slo-eng Slovenian-English Freedict dictionary
spa-eng Spanish-English Freedict dictionary
swa-eng Swahili-English xFried/FreeDict Dictionary
swe-eng Swedish-English Freedict dictionary
tur-deu Turkish-German Freedict dictionary
tur-eng Turkish-English Freedict dictionary
english English Monolingual Dictionaries
trans Translating Dictionaries
all All Dictionaries (English-Only and Translating)
web1913 Webster's Revised Unabridged Dictionary (1913)
world95 The CIA World Factbook (1995)

Mark
Last edited by MU on Tue 03 Jun 2008, 11:16, edited 1 time in total.

User avatar
dinky
Posts: 699
Joined: Sat 19 Jan 2008, 23:39

#2 Post by dinky »

Wow! Had no idea you had created this as well, it has become an integral part of my desktop... cheers matey.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#3 Post by Aitch »

Bump
Thanks Mark & dinky

You've just been linked to dansolo [Spanish team] on this Mark, so I hope it works with later Puppy versions OK?

Aitch

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#4 Post by erikson »

Interesting resource.

I wonder if there is a possibility to order the list of dictionary databases? I mean, by the user, in a persistent way, such that the most often used dic's can be made to always appear on top?
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

Aitch, I use it in Muppy 0083, so it should work in Puppy 3.
I did not test Puppy 4.

Here is a version updated by zigbert:
http://www.murga-linux.com/puppy/viewtopic.php?t=21426

And here is an offline-version:
http://dotpups.de/dotpups/Office/

I wonder if there is a possibility to order the list of dictionary databases? I mean, by the user, in a persistent way, such that the most often used dic's can be made to always appear on top?
Hm, with a slight patch...
run it, then copy /tmp/PB-dict.txt to /root/.

Now edit:
/usr/local/PBdict/main.pb

from:

Code: Select all

shell("dict -D >/tmp/PB-dict.txt")
dicts = readfiletolist("/tmp/PB-dict.txt")
to:

Code: Select all

//shell("dict -D >/tmp/PB-dict.txt")
//dicts = readfiletolist("/tmp/PB-dict.txt")
dicts = readfiletolist("/root/PB-dict.txt")
Like this the list of available dictionaries is not updated at every start.
You now could edit the permanent dictionary-list to your needs:
/root/PB-dict.txt

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#6 Post by Aitch »

MU wrote:Aitch, I use it in Muppy 0083, so it should work in Puppy 3.
I did not test Puppy 4.
Thanks Mark, the reason I asked was in forward thinking for inclusion in the potential DisasterLab CD - 'StBernardPuppy?', to be used at times of natural/other disasters, to get PC/comms up & running across language/boundary barriers, in times of great human need

http://www.murga-linux.com/puppy/viewtopic.php?t=4185

Is anyone testing on Puppy 4?
Do you know what BarryK's views on international support are?

Aitch

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#7 Post by erikson »

Thanks, MU.

Your instructions are close, though not fully correct (with Puppy 3.01's built-in PBdict, the dictionary list written to PB-dict.txt is overwritten further down in main.pb). I post hereafter the corrected procedure.

1. Get the list of available dictionaries into file PB-dict.txt

From rxvt:

Code: Select all

dict -D >/root/PB-dict.txt
2. Edit /root/PB-dict.txt according to the desired sequence

3. Patch main.pb
MU wrote:Now edit:
/usr/local/PBdict/main.pb
from:

Code: Select all

shell("dict -D >/tmp/PB-dict.txt")
dicts = readfiletolist("/tmp/PB-dict.txt")
to:

Code: Select all

//shell("dict -D >/tmp/PB-dict.txt")
//dicts = readfiletolist("/tmp/PB-dict.txt")
dicts = readfiletolist("/root/PB-dict.txt")
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

I made a new version, it allows to add personal entries:

http://www.murga-linux.com/puppy/viewto ... 965#219965

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#9 Post by MU »

New version: PBDict2

It includes the offline and online version.
Both versions are bugfixed and updated.
In both versions, you can add personal dictionaries.

Included are these offline-dictionaries:
deu-eng
deu-fra
eng-deu
eng-fra
eng-spa
fra-deu
fra-eng
spa-eng

Also the dictd server is included.

Download (5 MB):
http://dotpups.de/dotpups/Office/PBDict2.pet
mirror:
http://puppyfiles.ca/dotpupsde/dotpups/ ... BDict2.pet

Mark
Attachments
PBDict2a.jpg
(71.76 KiB) Downloaded 3721 times
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

updated PBDict2, it now handles own dictionaries better.
They now are also searched, if you choose "All databases", that was not the case before.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#11 Post by MU »

Updated PBDict2.

Long lines now are wrapped.
The personal dictionary now uses a simpler way to store data.
It is now compatible with Stardict .txt files.

An entry looks like this:

Code: Select all

table	Tisch\nTabelle\nTafel
Important: the first "free sign" is a "tab", not spaces!
The "\n" is a sign, that is used for a linefeed.

I included a utility to convert Stardict dictionaries.
See the help on how to use that.

On my Pentium 700, PBDict needs 5 seconds to find "Auto", and 17 seconds to find "Tisch" in the german Duden (18 MB).
This could be optimized with some coding, it depends on how much feedback I get to do that.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#12 Post by MU »

Updated again.

Please install Puppybasic 2.6, that updates earlier versions in Puppy 2, 3 and 4:
http://dotpups.de/dotpups/Programming/P ... ic-2.6.pet

Changes:
- long dictionary-entries were cut after 1024 characters. Fixed with new Puppybasic.

- Gtkdialog did not work correct in Puppy 4. Fixed.

- Searching the german Duden (18 MB as imported textfile) now just needs 5 instead of 17 seconds.

- Entries from Duden now are formatted in a better readable way. (linefeeds after ".;" but not after ";").

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

paulski
Posts: 130
Joined: Fri 06 Oct 2006, 15:30
Location: Cologne, Germany &/or Perth, Australia

#13 Post by paulski »

Thanks Mu, you are my hero of the week.
Thanks to your hard work I now have something I've needed for a long time: real dictionaries with definitions "offline" and not just "equivalent" words in two different languages. As a native English speaker trying to use German I needed a little more than what I was getting from the Ding dictionary from the University of Chemnitz (which is quite a good GREP/EGREP engine for a free system). I looked into commercial stuff but its just not worth the money at the moment with too much unreliability on nearly all systems. All I needed was a simple lightweight program that worked in Puppy 4.

I tried using some of the resources from Stardict, (like the LDaF - German as a foreign language) used your converter and yipee it works.

Once again great work!

otropogo

#14 Post by otropogo »

paulski wrote:Thanks Mu, you are my hero of the week.
Thanks to your hard work I now have something I've needed for a long time: real dictionaries with definitions "offline" and not just "equivalent" words in two different languages. ....
I second the motion! But I'm still struggling with PB-dict/Stardict.

For one thing, I've got three stardict tabs in Pup 4.0, two in the documents menu, and one in utilities, all of which open the same window...

Then, there are three p... dictionaries in documents, pbdict2, which offers to go online or offline, pbdict, which does nothing I can see, and pdict, which offers a window that says "online dictionary and thesaurus", and seems to offer the same list of databases as pbdict2..

How these three(?) programs are integrated is a troublesome mystery to me. So far, I've made halting use of PBdict2 only, and am continually frustrated by the need to scroll down the long list of database options and select one., or by the need to scroll through a long hit list of translations I don't need to find the one I do need.

Is there any way I can narrow the databases to search from and save this selection, so that only these databases are searched each time I open the program?

Adding new words to the personal database and having it included in my searches is next on my list. Some of the gaps in the word lists are pretty glaring, But more importantly, I need to construct an English-French(Canadian) glossary of legal terms, and perhaps (if and when I have time) a similar glossary of German-English hunting terminology, so as to make these vocabularies quickly and easily available .

I've now acquired the source material in print that allows me to do this, but am not sure how to best to go about it. Admittedly, I haven't tried the old trial and error method - but I have a healthy distaste for reinventing the wheel.....

So if anyone out there has some experience with any of these problems, I'd like to hear of it.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

concerning the multiple entries in the menu:
look in /usr/share/applications for the corresponding .desktop files.
Move the one you think that are unneeded to a backupfolder, then type in a console "fixmenus" to update the menu.

Concerning the long list in the online dictionary:
you could patch Pbdict2.
Edit:
/usr/local/PBDict2/online/main.pb

Around line 25 it has:

Code: Select all

writelisttofile("/tmp/PB-dict.txt" , mydicts)

shell("dict -D >>/tmp/PB-dict.txt")
dicts = readfiletolist("/tmp/PB-dict.txt")
Replace "/tmp/" with "/root/".
Then run it.
Now you get a file
/root/PB-dict.txt

You could edit this, and delete all dictionarys you do not want.

Then again, edit:
/usr/local/PBDict2/online/main.pb

Now replace:

Code: Select all

writelisttofile("/root/PB-dict.txt" , mydicts)

shell("dict -D >>/root/PB-dict.txt")
dicts = readfiletolist("/root/PB-dict.txt")
with:

Code: Select all

// writelisttofile("/root/PB-dict.txt" , mydicts)

// shell("dict -D >>/root/PB-dict.txt")
dicts = readfiletolist("/root/PB-dict.txt")
So you comment the lines, that would overwrite your customized list with a new one.

I'm aware, that this is a bit ugly, I just don't have the time at moment, to write a setup-dialog for such a personal setting.
It might be neat to have such a dialog, so I might add it, when I have time.
But that can take a while, I can promise nothing...

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

otropogo

#16 Post by otropogo »

MU wrote:concerning the multiple entries in the menu:
look in /usr/share/applications for the corresponding .desktop files.
Move the one you think that are unneeded to a backupfolder, then type in a console "fixmenus" to update the menu.

Concerning the long list in the online dictionary:
you could patch Pbdict2.
Edit:
.....
I'm aware, that this is a bit ugly, I just don't have the time at moment, to write a setup-dialog for such a personal setting.
It might be neat to have such a dialog, so I might add it, when I have time.
But that can take a while, I can promise nothing...

Mark

Thanks Mark. As always, I appreciate your help. This should keep me busy for a while.

otropogo

#17 Post by otropogo »

MU wrote:concerning the multiple entries in the menu:
look in /usr/share/applications for the corresponding .desktop files.
Move the one you think that are unneeded to a backupfolder, then type in a console "fixmenus" to update the menu.

Mark,

It took me almost three weeks to get around to it, but I finally tried your suggestion above for removing duplicate application tabs, but it only worked one time out of three.

The entry it worked on was XF-Prot-virus-scanner.desktop, which wasn't responding to clicks anyway.

But removing PBDictPersonal-online-dictionary.desktop didn't remove its tab in the utilities menu, although this tab is also non-functional.

And removing stardict.desktop, which does start up stardict 3.01, and which has tabs in both documents and utilities (in addition to the stardict3.01 tab) did not remove those excess tabs either.

Is there something else I need to do to get rid of these?

I'm also wondering whether there's any reason to keep the Pdict online dictionary, which appears to differ from PBDict2 only by not having an edit tab and not offering a choice of online/offline at startup?

Haven't tried editing the online dictionary list yet.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#18 Post by MU »

In Puppy, you must type:
fixmenus
in a consolewindow and restart your windowmanager, to update the menu with your changes.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

otropogo

#19 Post by otropogo »

MU wrote:In Puppy, you must type:
fixmenus
in a consolewindow and restart your windowmanager, to update the menu with your changes.

Mark
HMMM. So sorry. I certainly did the fixmenus entry, at least five times, but maybe I forgot to restart JWM after the first time. I was fairly sure I had, but then when I restarted JWM just now, the tabs finally disappeared...

What about Pdict? Is there any reason to keep its tab or is PBDict2 performing all of Pdict's functions?

Thanks for your patience.

PS. can I just install the new PBDict2a on top of the previous one, or do I need to uninstall PBDict2 first?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#20 Post by MU »

What about Pdict? Is there any reason to keep its tab or is PBDict2 performing all of Pdict's functions?
No need to keep it.
PBDict2 includes everything from the older versions.
PS. can I just install the new PBDict2a on top of the previous one, or do I need to uninstall PBDict2 first?
No need to uninstall it first.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Post Reply