[Attempto] Tutorial on Creating User-Specified Lexicons

Tobias Kuhn kuhntobias at gmail.com
Fri Aug 6 18:11:20 CEST 2010


Hi Chris,

The word "wheel" is not part of the small lexicon in the APE package, 
but is part of the large lexicon that is used by the APE web service and 
that can be downloaded separately on the Attempto download page (under 
"Large Content Word Lexicon (Clex)"):

   http://attempto.ifi.uzh.ch/site/downloads/

With the small lexicon, your example can be parsed as follows:

   ./ape.exe -text "Every car has some wheels." -solo drspp -ulextext 
"noun_pl(wheels, wheel, neutr)."


Cheers,
Tobias


On 08/06/2010 05:13 PM, Chris Spencer wrote:
> On Fri, Aug 6, 2010 at 10:58 AM, Norbert E. Fuchs<fuchs at ifi.uzh.ch>  wrote:
>>
>> On 6 Aug 2010, at 16:44, Chris Spencer wrote:
>>
>>> I'm new to APE. I played around with it, and although it seems to
>>> include a impressive built-in lexicon, I quickly ran into simple
>>> sentences that couldn't be parsed. For example, running:
>>>
>>> ./ape.exe -text "Every car has wheels." -cparaphrase
>>>
>>> gives me the error:
>>>
>>>     <message
>>>        importance="error"
>>>        type="word"
>>>        sentence="1"
>>>        token=""
>>>        value="wheels"
>>>        repair="Use the prefix n:, v:, a: or p:."/>
>>>
>>> Am I correct in interpreting this error to mean that the word "wheels"
>>> is not contained in the built-in lexicon? If I wanted APE to
>>> understand this sentence, what would I include in a custom lexicon?
>>>
>>> Instead, I tried defining "wheels" by running:
>>>
>>> ./ape.exe -text "Every car has wheels." -cparaphrase -ulextext
>>> "noun_pl(wheels, wheel, neutr)."
>>>
>>> but that only gives me the more general error:
>>>
>>>   <message
>>>       importance="error"
>>>       type="sentence"
>>>       sentence="1"
>>>       token="4"
>>>       value="Every car has&lt;&gt; wheels."
>>>       repair="This is the first sentence that was not ACE. The sign
>>> &lt;&gt; indicates the position where parsing failed."/>
>>
>> Chris
>>
>> The word "wheel", respectively "wheels" is contained in the built-in lexicon.
>>
>> However, ACE requires each noun to have a determiner, which you forgot. If you try, for instance
>>
>>   Every car has some wheels.
>>
>> or
>>
>>   Every car has four wheels.
>>
>> then APE will happily accept your sentence.
>>
>> Since you state
>>
>>> I'm new to APE. I played around with it,
>>
>> I suggest that you have a look at the documentation.
>>
>>
>>> Is there a guide or tutorial on defining a custom lexicon? I found
>>> http://attempto.ifi.uzh.ch/site/docs/ace_lexicon.html, but I'm still
>>> confused on what exactly I need to do to define my own words.
>>
>> May I suggest that you read this document again. If you still have problems let us know.
>>
>>> Also, which verb tenses are currently supported by APE? In my tests,
>>> it seems like APE cannot understand any past-tense verbs. Are there
>>> any plans to support different tenses?
>>
>> ACE currently knows only the simple present tense. See section 2.3 Verb Phrases of http://attempto.ifi.uzh.ch/site/docs/ace_constructionrules.html
>>
>> There are currently no plans to add other tenses.
>>
>> Regards.
>>
>>    --- nef
>
> Thanks for the clarification. Yes, I had read that nouns require a
> determiner, and forgot this in my example. However, your corrected
> sentences still return the same error.
>
> localhost$ ./ape.exe -text "Every car has some wheels." -cparaphrase
> <?xml version="1.0" encoding="UTF-8"?>
>
> <apeResult>
>    <duration tokenizer="0.010" parser="0.000" refres="0.000"/>
>    <paraphrase></paraphrase>
>    <messages>
>      <message
> 	importance="error"
> 	type="word"
> 	sentence="1"
> 	token=""
> 	value="wheels"
> 	repair="Use the prefix n:, v:, a: or p:."/>
>      <message
> 	importance="error"
> 	type="sentence"
> 	sentence="1"
> 	token="5"
> 	value="Every car has some&lt;&gt; wheels."
> 	repair="This is the first sentence that was not ACE. The sign
> &lt;&gt; indicates the position where parsing failed."/>
>    </messages>
> </apeResult>
>
> localhost$ ./ape.exe -text "Every car has four wheels." -cparaphrase
> <?xml version="1.0" encoding="UTF-8"?>
>
> <apeResult>
>    <duration tokenizer="0.010" parser="0.010" refres="0.000"/>
>    <paraphrase></paraphrase>
>    <messages>
>      <message
> 	importance="error"
> 	type="word"
> 	sentence="1"
> 	token=""
> 	value="wheels"
> 	repair="Use the prefix n:, v:, a: or p:."/>
>      <message
> 	importance="error"
> 	type="sentence"
> 	sentence="1"
> 	token="5"
> 	value="Every car has four&lt;&gt; wheels."
> 	repair="This is the first sentence that was not ACE. The sign
> &lt;&gt; indicates the position where parsing failed."/>
>    </messages>
> </apeResult>
>
> Is there some other detail we're missing?
>
> Regards,
> Chris
> _______________________________________________
> attempto mailing list
> attempto at lists.ifi.uzh.ch
> https://lists.ifi.uzh.ch/listinfo/attempto


More information about the attempto mailing list