[Lexicog] example reference

Mike Maxwell maxwell at LDC.UPENN.EDU
Fri May 6 16:39:38 UTC 2005


Another way to eliminate newlines is to pipe text through a program like
Unix's 'tr' (readily available for DOS and Windows as well), and convert
all the newlines to some char that you don't use elsewhere, like tab.
Then run that through whatever processing you want, and when you're
done, convert the tabs back into newlines.  This of course assumes that
you're using some sort of batch process, rather than an interactive
editor.

I commonly use such a technique to produce a "normalized" version of
Sh/Toolbox lexicons, where fields do not contain newlines.  In that
case, you don't want to simply convert tabs back into newlines: you only
want to convert a tab if it is followed by a backslash (i.e. an SFM),
using a tool like 'sed'; otherwise you replace the tab with a space char.

--
	Mike Maxwell
	Linguistic Data Consortium
	maxwell at ldc.upenn.edu


------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/RzSHvD/UOnJAA/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