Dictionary Context
To make matching Dictionary entries depend on words or phrases ( context items ) in the surrounding text block (visible in the Sintelix document view).
The context items list is a space separated list of context items, each of which may be prepended with a "+" or a "-". For example:
Context items are case insensitive.
Context items operate as follows, depending on the prepended sign:
- "+" prepended items - must appear in the surrounding text block
- "-" prepended items - must NOT appear in the surrounding text block
- unprepended items - at least one unprepended item must appear in the surrounding text block
Note: that a single unprepended context item behaves the same as a "+" prepended item with the same text.
A single unprepended context item behaves the same as a "+" prepended item with the same text.
Each #cond:context
command clears and supersedes the previous one.
Examples
[To be found with the example Dictionaries distributed with Sintelix]
/*
#EXAMPLE
He closes all windows in computer.
He accidentally deleted a document on his computer.
He installed Windows operating system and the Internet Explorer browser.
He left the windows open.
#EXAMPLE END
*/
#wordlist tag:Demo4-Context
// the enclosing textblock must not contain "computer" or "microsoft"
#cond:context -computer -microsoft -operating -system
windows
// the enclosing textblock must contain either "computer" or "electronic"
#cond:context computer electronic
file
document
// the enclosing textblock must contain both "web" and "internet"
#cond:context +web +internet
address
// the enclosing textblock must contain "internet", and either "web" or "www"
#cond:context +internet web www
page
// to put phrase in cond:context, enclose it in double-quotes
#cond:context -"internet explorer" -msie
browser
// and the context condition carries over to the next word list
#wordlist tag:Demo4-Context-2
operating system
// clear the context conditions
#clear cond:context
installed
Giving the results: