[Lexicog] example reference

Sebastian Drude sebadru at ZEDAT.FU-BERLIN.DE
Fri May 6 16:03:21 UTC 2005


Dear Jan F. Ullrich,


in my experience, order of fields is the major source of errors and
embarrasment in Toolbox.  Especially, if you want to adapt the MDF setup
to your needs or theoretical convictions, the "export to RTF"-feature
usually is affected negatively.

The problem seems to be to be that in the standard MDF-setting, the \xv
is indeed hierarchically below the \rf field, which threfore should come
first in order (and the \xe field is below \xv).  If you use another
order than the standard MDF  \rf - \xv - \xe , you will have many
unexpected results when exporting or resorting your database (and, with
other fields, when doing interlinearization).

You can of course change the settings and reorder the MDF hierarchy of
the fields in question (for instance, putting \xv directly under \sn in
the marker properties, and both, \xe and \rf, under \xv, which would
reflect your usage of these fields).  This would remedy some problems
within shoebox (e.g., resorting by \xv and browsing for \xv and the
correspondant \rf).
But your database will still not be compliant with the standard
MDF-format needed for exporting to RTF, and these problems probably will
persist.

Therefore I suggest indeed that you reorder the sequence of the three
fields in question in your whole database.

> I am quite certain that all the \xv - \xe - \rf fields are ordered
> consistently throughout my database.

This is good, because you probably will be able to easily change the
order of the fields with an programmable texteditor such as vi, emacs,
sed or similar, or with CC tables (which I do not know well enough).

As far as I know, the Toolbox consistancy check does not account for
ordering of fields.  In the case of repeated groups this would indeed
lead to confusion.


I personally use the Emacs editor for these sort of tasks (manipulating
Toolbox databases outside Toolbox).  In this case, I would propose doing
a regular expression search and replace.

For instance, search for (Alt-x replace-regexp in Emacs) the following
RegExp (without the quotes):

"\(
\\xv[^\\]*\)\(
\\xe[^\\]*\)\(
\\rf[^\\]*\)\([
]*\)\\"

and replace each match by:

"\3\1\2\4\\"

I did only basically test this, it seems to work.
If you have repeated blocks:

\xv ...
\xe ...
\rf ...

\xv ...
\xe ...
\rf ...

\xv ...
\xe ...
\rf ...

you will have to repeat the search and replace at least once.

Details of the RegExp. may vary conforming the editor or other
regular-expression-tool you might choose, e.g., the newlines in the
expressions (Ctrl-Q, Ctrl-J in Emacs) might be to be replaced by "\n" or
the "^" might be replaced by "!" (or still, each ocurrence of the
quoting "\" by "\\", and the actual backslash "\\" by "\\\\", if you do
programming in lisp).

If you are sure that there are no linebreaks within your \xv, \xe and
\rf fields, the pattern is simpler and more reliable:

Search for RegExpr:

"^\(\\xv.*
\)\(\\xe.*
\)\(\\rf.*
\)"

and replace each match by:

"\3\1\2"

If there are linebreaks in your fields, but you can do without them, you
can choose to eliminate all linebreaks in these fields first.
Unfortunately, activating the "no word wrap" feature in the marker
properties and doing a consistancy check on the data properties of these
fields will not detect existing line breaks -- By the way, can anybody
in the list tell me why this is so?

Again, you can eliminate them with a regular expression search and
replace, repeated as many times as necessary:

"^\(\\\(xv\|xe\|rf\).*\) *
  *\([^\\]\)"

"\1 \2"

More about regular expressions:
	http://www.regular-expressions.info/

More about emacs:
	http://www.gnu.org/software/emacs/emacs.html

All the best and good luck

Sebastian Drude

--
|   Sebastian   D R U D E         (Lingüista, Projeto Aweti / DOBES)
|   Setor de Lingüística   --  Coordenação de Ciências Humanas (CCH)
|   Museu Paraense Emílio Goeldi,  Belém do Pará   --  CNPq  --  MCT
|   Cx.P. 399  --  CEP: 66 040 - 170  --  Tel. e FAX: (91) 274 40 04
|   Email:   sebadru at zedat.fu-berlin.de    +   drude at museu-goeldi.br
|   URL:   http://www.germanistik.fu-berlin.de/il/pers/drude-en.html



------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EA3HyD/3MnJAA/79vVAA/HKE4lB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/lexicographylist/

<*> To unsubscribe from this group, send an email to:
    lexicographylist-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



More information about the Lexicography mailing list