Good Friday there, working on a book with many too long sentences, I got the following idea/question: Is it possible to recognize the length of a sentence, and to let context show in the pdf, if there is a too long sentence. For example I am thinking of an command like \version[longsentence,15] which sets an symbol like "*" in the margin, if a sentence has more than 15 words. First, correct sentence-regonition could be a task: It is not enough to count the words between two dots, because of abbreviations. But there is probably a known algorithm for handling those problems. I think a feature like this could be interesting for context (and for my work :D) Thanks for you comments Huseyin
On 2013–02–15 "H. Özoguz" wrote:
working on a book with many too long sentences, I got the following idea/question: Is it possible to recognize the length of a sentence, and to let context show in the pdf, if there is a too long sentence.
This sounds more like a job for the text editor. Many text editors already know what a sentence is. That means it's as easy as looping over all sentences and counting the characters/bytes and performing some action (e.g. placing the cursor or injecting a ConTeXt macro). Marco
···
Good Friday there,
working on a book with many too long sentences, I got the following idea/question: Is it possible to recognize the length of a sentence, and to let context show in the pdf, if there is a too long sentence.
Places to start: http://en.wikipedia.org/wiki/Sentence_breaking http://en.wikipedia.org/wiki/Natural_language_processing#Major_tasks_in_NLP Good luck :P Philipp
For example I am thinking of an command like \version[longsentence,15]
which sets an symbol like "*" in the margin, if a sentence has more than 15 words.
First, correct sentence-regonition could be a task: It is not enough to count the words between two dots, because of abbreviations. But there is probably a known algorithm for handling those problems. I think a feature like this could be interesting for context (and for my work :D)
Thanks for you comments Huseyin
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
participants (3)
-
"H. Özoguz"
-
Marco Patzer
-
Philipp Gesang