If I were to do something like this, I'd try to use regexp-opt to build a
regular expression that matches all the words that should be replaced, and
use a hash table to look up the replacements. I'm not sure what would
happen to regexp-opt if you fed it a list of 3000 words, though - it might
blow up.
On Thu, Nov 7, 2013 at 11:36 AM, Uwe Brauer <oub(a)mat.ucm.es> wrote:
Hello
I would like to have a lisp pkg which would replace certain words in a
text.[1]
For this I need two things,
- a function which does the replacement and
- a list containing words with and without niqqud.
Concerning the first, I have already a function, which is loosely
based on iso-accentuate, or a function
(TeX-to-char) which was provided by Aidan
some years ago, which replaces latex symbols by its UTF8
equivalents. I am not sure which code is more efficient, I'll
will to post the central part of the code later.
However what bothers me more is the second part. I obtained the
hebrew bible in UTF8 format and could then generate the desired
list. However it seems to me that this list would be huge, at
least 2000 to 3000 words if not more.
What is a reasonable size limit for such a list???
Is 2000 words to big? or must I divide the list in several parts
(and files) and write corresponding functions?
Footnotes:
[1] to be precise, to substitute hebrew words by hebrew words with
vowels, so called niqqud
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta