[Attempto] Counting, like "how many"

Tobias Kuhn kuhntobias at gmail.com
Tue Jan 4 13:17:19 CET 2011


Hi Pierre-Alexandre,

> I'm trying to express something like :
>
> "Write a program to generate 1000  numbers between 0 and 99 inclusive.
> You should count how many times each number is generated and write
> these counts out to the screen. "
>
> I have two problems :
> For the first sentence "Jh writes a program which v:generate  1000
> numbers between 0 and 99 ." works but the between concept disappear in
> the DRS data.
> I just have the information about a countable object which have two
> parts, 0 and 99.
> So, when I tried the drs_to_ace tool, I had : Ace = [['There is a
> program X1.', 'Jh writes the program X1.', 'The program X1 v:generate 99
> and 0 1000 random numbers.']]. which shows that "between" disappears.
>
> Is it normal ?

You shouldn't use the prefixes like "v:" when it's not necessary. In 
your case, "generate" has been interpreted as a ditransitive verb (like 
"give") with the preposition "between". In such cases, the prepositions 
do not appear in the DRS, because some sentences like "John gives an 
apple to Mary" have an equivalent representation without a preposition: 
"John gives Mary an apple".

Your example could be written as follows:

   Jh writes a program which generates 1000 numbers between 0 and 99.

Note that prepositions like "between" attach to the verb, not to the 
noun, which is not exactly what's required in your case. So, the sentence

   Jh writes a program which generates 1000 numbers which are between 0 
and 99.

is probably more appropriate.

> My second problem is to express "Computer count how many times each
> number is generated".
>
> I tried a lot of sentence. "How many" doesn't work. I tried too with
> "the count" and "the number".
> I can't find a way to write this sentence.
> Is it possible ?
> Thank you

There is no "how many", because this is outside of first-order logic, at 
least in the general case. But you can still express your intention in 
ACE, e.g:

   Computer, count all sentences that are generated!


Cheers,
Tobias


More information about the attempto mailing list