Context Sensitivity
Context Sensitivity is a type of Conditions.
Setting a context condition allows you to only annotate an entry if a word or phrase exists (or does not exist) in the same text block as the entry.
Syntax
Set Context:
#cond:context <+/-><condition> <condition><condition>
Clear Context:
#clear context: <type>
<+/->
-
If not defined, term must be in the text block (assume plus sign by default).
-
Exclusion (- negative) takes precedence over inclusion (+ positive).
<term>
-
If term contains more than one word, enclose the term in double quotes (e.g. “New Zealand”)
-
You can include multiple terms, leaving a space between terms. When multiple terms are provided, any one can be true.
Example: Combining Context
Sometimes the context of a word can be important to ensure only the required terms are referenced.
The example below illustrates that Renault can be a community as well as a car manufacturer. Using context conditions, we can exclude Renault mentioned in reference to the word community and only include Renault if car, cars or automobile are mentioned.
Note when multiple conditions are listed, only one of them needs to apply. The negative context takes precedence, meaning it checks if exclusions (community) are not included first and then checks one of the inclusions (car, cars, or automobile) are included.
#wordlist tag:Manufacturer
#cond:context car cars automobile -community
Renault
/*
#EXAMPLE
Renault is a small unincorporated community in the historic Renault Princt of Monroe Country, Illinois, United States.
Renault is a French multinational automobile manufacturer established in 1899. The company produces a range of cars and vans and in the past, has manufactured trucks, tractors, tanks, buses/coaches, aircraft and aircraft engines, and autorail vehicles.
#EXAMPLE END
*/
Result:
Renault is a small unincorporated community in the historic Renault Princt of Monroe Country, Illinois, United States.
Renault is a French multinational automobile manufacturer established in 1899. The company produces a range of cars and vans and in the past, has manufactured trucks, tractors, tanks, buses/coaches, aircraft and aircraft engines, and autorail vehicles.
Example: Clearing Context
The example below illustrates that tank can be referenced in different ways, for example you can have a water tank, a think tank or a tank that is a weapon.
Note the context condition is cleared before listing other Weapon entries.
#wordlist tag:Weapon
#generalize:plural true
#cond:context -water -think
tank
#clear cond:context
artillery
bombs
missiles
aircraft carrier
/*
#EXAMPLE
The Project for the New American Century (PNAC), a neoconservative think tank, issued its statement of principles: to achieve “a foreign policy that boldly and purposefully promotes American principles abroad.”
Water tanks, electrical plants, hospitals, and schools were destroyed. The miners, handling diamonds worth tens of millions of dollars, were lucky to eke out enough rice for themselves and their families.
In late 2000, several Ukrainians sell 150 to 200 T-55 and T-62 tanks to the Taliban in a deal conducted by the ISI, and Bout helps fly the tanks to Afghanistan.
During the attack, artillery, bombs and missiles were used to disable the front line forces, including over 20 tanks.
#EXAMPLE END
*/
Result:
The Project for the New American Century (PNAC), a neoconservative think tank, issued its statement of principles: to achieve “a foreign policy that boldly and purposefully promotes American principles abroad.”
Water tanks, electrical plants, hospitals, and schools were destroyed. The miners, handling diamonds worth tens of millions of dollars, were lucky to eke out enough rice for themselves and their families.
In late 2000, several Ukrainians sell 150 to 200 T-55 and T-62 tanks to the Taliban in a deal conducted by the ISI, and Bout helps fly the tanks to Afghanistan.
During the attack, artillery, bombs and missiles were used to disable the front line forces, including over 20 tanks.