Conjecture#

wowool allows you to write guesser rules, which are very powerful.

If we make this useful context rule:

// The Taiwanese company Epistar
rule :
{
    PlaceAdj
    'company'
   {(Prop)+} = MyCompany
};

We will annotate ‘Epistar’ as a company. So far, so good. The problem is that next time we see ‘Epistar’ in another context we do not know any more that Epistar is a company. To circumvent this problem, there is a way to make your program ‘learn’ from what we have seen before. This is called conjecture, and it is as easy as enclosing these rules with the conjecture namespace:

namespace conjecture
{
    rule :
    {
        PlaceAdj
        'company'
        {(Prop)+} = MyCompany
    };
}

Output:

“The Taiwanese company [Epistar] is a rising star. [Epistar] has recently launched a suite of new tools”

Note

conjecture is the first namespace that is applied, it runs directly after using the lexicons. This means that you can not use, in your conjecture rules, any other annotation coming from rules, just lexicons.

  • when assigning a concept to be conjecture you can modify the literl that will be conjectured, or add more then one by using on of the following attributes.
    • _ending: This attribute will just use the captured literal and add the _ending attribute.

    • _replace: The _replace attributes does the same except that you can use regular expresion to add a more complex literal to be conjectured.

namespace conjecture
{
    rule:
    {
        "Mr" {Prop}=PersonFam@(
                    _replace="/(.+)/$1s/",
                    _ending="s")
    };
}

Output:

“Mr [Yamtashi] is waiting in the station. [Yamtashis] train was delayed.”