From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Keeping an advanced dictionary in Org-mode? Date: Mon, 06 Jun 2011 20:08:08 +0200 Message-ID: <4DED1788.3080906@christianmoe.com> References: <4DECA029.2000905@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTeDe-0005kG-SY for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 14:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTeDc-0007A3-Pg for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 14:08:06 -0400 Received: from mars.hitrost.net ([91.185.211.18]:53277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTeDb-00072S-V4 for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 14:08:04 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Alan E. Davis" Cc: Org Mode Hi, Thanks, these pointers were really helpful -- whether I end up doing something similar, or using them to work out how I want to do this in Org, or using other tools I was able to discover in five minutes after you'd pointed me to the right search keywords! ( Like SIL's Toolbox: http://www.sil.org/computing/catalog/show_software.asp?id=79 ) Yours, Christian On 6/6/11 4:50 PM, Alan E. Davis wrote: > FWIW: > > I won't get into it much for now, but I have used a "band format" for > lexical data. There are other names for this type of free form > database. I wrote a crude elisp routine to recover entries into LaTeX > formatted files. > > A "band" is a record, so to speak. I am not very well qualified in > this, but was able to use it to record lexical data. You may find > some linguists' websites where this or similar formats are > elucidated. A record starts with a double dotted key, and information > categories may be made up on the fly, as marked by single-dotted > keys, preceded by at least two spaces. I think it's convenient for a > record to be delineated by a line feed, as well. > > ..HW .D .GE .NS > .NCE .NCs .R > .RC > > This is just a made up case, but perhaps you can catch the drift. > > Here are a couple of simple cases from my files: > > ..hw tutubi ,lang vis .nce dragonfly .source FSD > ..HW sigai .lang vis .ge (mollusc) shell, when empty > ..hw soksok .ec gecko .cg .la ilo .src hanna .n > ..hw locus .ec octopus .cg .la ilongo .src hannah .n see nucus > [vis]; kuus [chuukese] > ..hw tikling .ec heron .cg .la vis .from fsd > ..hw nucus .ec octopus .cg .la vis .src fsd, hannah .n related to > chuukese kuus > > Fairly straightforward elisp would scan a record and wrapping each > item in a particular typeface. > > To get an idea of the output. Each line was output as an \item in a > list. This got to be a LITTLE cumbersome, perhaps, and someone good > at coding would do it differently. The idea is that a lisp routine > scans the records and spits out list items. This could be any kind of > output, and perhaps org mode would be a good way to rig a routine to > scan list items and output different band types as slanted (\sl), > roman, or italicized components. > > \item [{\sl k\'{u}\'{u}s\/}$_{3}$] \index{k\'{u}\'{u}s} \quad > Small, night-time octopus. HADJ E\'{e}t. > > \item [{\sl k\'{u}\'{u}s\/}$_{4}$] \index{k\'{u}\'{u}s} \quad > Daytime octopus. {\sc syn\/}:\ {\sl nippach}. {\sc alt\/}:\ {\sl > k\'{u}\'{u}h}. \HADJ F\'{o}n\'{o}. > > \item [{\sl k\'{u}\'{u}sen neepwin\/}] \index{k\'{u}\'{u}sen > neepwin} \quad {\sc see\/}:\ {\sl nippachin neepwin}. Even > though this is not said, it would be the correct way to say it. \HADJ > Wonip. > > > This may not be an appealing approach. I am still pleased with the > ability to flexibly add band keys on the fly, during data entry, and > the potential to use LaTeX as a frontend. HTML would also be useful, > depending on how you wish to read your dictionary. > > Not a perfect system. Linguists have done better. Robert Hsu of the > University of Hawaii built a system around SPITBOL and maybe SNOBOL4. > I was hopelessly lost trying to use those, but elisp did what little I > needed. I think that it may be possible to organize a database using > org-mode. > > For now, I have a capture template for data entry, such as it is: > > ("=" "lex" entry (file+headline "lexicon.org " > "Unsorted") "* ..hw %^{Headword} .gs %^{Scientific Name} .ge > %^{English Gloss} .ec %^{English Common Name} .cg %^{Category} .la > %^{Language} .src %^{Informant} .n %^{Note} %? .dt %u " :prepend t > :immediate-finish t) > > Again, FWIW. To me, a great deal. Maybe to others, not so great of a > deal. > > Alan > > > On Mon, Jun 6, 2011 at 7:38 PM, Christian Moe > wrote: > > Hi, > > Is anybody using Org-mode to build an advanced dictionary with > sub-entries, tags etc.? Would you be willing to share a setup? > > For example, the obvious way to build a dictionary would be to use > a dictionary list (I borrow a few English-French lines from the > wonderful WordReference.com site): > > - pine :: > (/paɪn/) > 1. /m noun/ [bot.] pin; *stripped ~* pin décapé. > 2. /intr verb/ languir (*for* après; *to do* de faire) > > This looks nice, but unfortunately, you cannot set tags or > properties on dictionary terms, so it's not particularly amenable > to fancy searching, mapping etc. > > On the other hand, you could do something like this: > > * pine > :PROPERTIES: > :Pronunciation: /paɪn/ > :END: > ** pin :bot: > :PROPERTIES: > :Word_class: noun > :Gender: m > :END: > *stripped ~* pin décapé. > ** languir > :PROPERTIES: > :Word_class: verb > :Transitivity: intr > :END: > (*for* après; *to do* de faire) > > It's a pain to do, and because of outline folding, it could be a > pain to look up meanings, and you might need to do some serious > post-processing on the export to make it look anything like a > dictionary. But when you're done, you could extract a list of all > botanical terms (:bot:), or of words and pronunciations only... etc. > > So for my growing pile of translation notes, I might like to keep > that kind of thing. But there are so many ways it could be > organized - what do you put in subheadings? what in entry text > below subheadings? what in tags, what in properties? etc. So if > someone has an example that works for them, I'd like to see one. > > (Org may not be the best tool for this job, of course, but it's > the right tool for me...) > > Yours, > Christian > > >