AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Linguistic Analysis for facts
 
 

Trying to work on an analyser of questions so that data can be extracted from them to ask for and create facts. Don’t think there is built in support for this with pos in CS but not sure. Found a great list of conversational movie questions to use as my examples over here. Starting with basic what questions. Also, currently avoiding contextual questions like “what is that”? Also avoiding conjunctions and multi-questions like “What is the cinema where you go the most?” Where may be an adverb instead of question word there…

Q Question word
PN Pronoun
D   Determiner
B   Adverb
N   Noun,pronoun
V   Verb
PP Preposition

Complex structure:
[Q   V {PP} {PN/D} {B} {A} N/V] [PP/PN {PN/PP} {B} {A} {N/V}]

Basic structures:

Q V {PP} {PN} {B} {A} N
What is in your most hated horror movie?
What is your favorite movie?
What are your movies?

Q V {PP} {PN} {B} V
What do you always enjoy?

Q V {PP} {PN} {B} PN
What are you?
What bores you?

Q V {PP} {D} {B} {A} N
What is in a really good movie?

Q V {PP} {D} {B} V

Q V {PP} {D} {B} PN

Can’t find valid examples for these last two forms. Maybe I’m missing something?
Some of the questions listed here are also not from the list since I wanted to use other examples that match the particular form.

 

 
  [ # 1 ]

so is there a question here you want me to answer?  You list a bunch of structures. They can all be represented in chatscript
~qwords is the set of question words that you would start a sentence with.
You can define a concept: ~nounlike (~noun ~pronoun_subject ~pronoun_object)  to match nouns and valid pronouns as a single entity.  etc.

 

 
  [ # 2 ]

Well, I wasn’t able to think of a sentence to match the last two structures? Wondering if you could….

Why does :down ~nounlike and many other pos concepts return a blank though?

Also, say I define a pattern as (_~qwords _[~verbs ~auxverblist] _{~prepositionroot} _{~determinerlist} _~noun)
I assume the matches for the optional words will be null if they don’t exist?

And a complex sentence like “What was the most boring play you have been known to watch in the theatre?” has a recurring pattern of compound verbs like “have been known”. Since we dont know how many times the concept may recur will we have to create patterns for all possible number of recurrences? I realize at my current stage I will only be dealing with much simpler structures but I just want a clarification on pattern matching for all compound forms….

 

 
  [ # 3 ]

Added to the above post is the following question:

u: (words _*) ^keep() ^repeat() ^if (_0 != ~enjoy) {no match _0} else {match _0}

I thought the above would let me test for a match in a concept but it only matches the specific string ~enjoy. Is there a way to do what I want? Is the only way to do a member fact query? And is it possible for nested concepts?

 

 
  [ # 4 ]

responding to your latter first:

^if (_0 ? ~enjoy) 
is what you want.  but why are you matching that way instead of
u: (words _~enjoy)

 

 
  [ # 5 ]

Q V {PP} {D} {B} V
You can’t have two verbs in a main sentence back to back.

Q V {PP} {D} {B} PN
In the main sentence you could say:  who was that?

You really should match on roles, not on postags.
(~qword * ~mainsubject * ~mainverb * ~mainobject)

also matching the ~aux_verb is generally useless, just a factor in determining %tense

 

 
  [ # 6 ]

You really should match on roles, not on postags.
(~qword * ~mainsubject * ~mainverb * ~mainobject)

also matching the ~aux_verb is generally useless, just a factor in determining %tense

Does any of the documentation discuss these roles at greater length?

Also I am unsure of how to use unipropogate. I thought the following code should return something but I’m pretty sure the query fails.

u: (uni) ^keep() ^repeat()
^query(unipropogate cab ? ~vehicle 1 )
Say @0subject @0verb @0object

 

 
  [ # 7 ]

I can’t speak to greater length on a role (how much length can you give to saying ~mainsubject is the main subject of the sentence).  But whatever is said will likely be said in the PosParser document

 

 
  [ # 8 ]

Q V {PP} {D} {B} V
Q V {PP} {D} {B} PN

Determiners (“a/the”) must eventually always be followed by a noun. Pronouns “he” and verbs “work” never have a determiner applied to them. Pronouns don’t because they are specific references already. “The work” may have a determiner but is grammatically a noun, regardless whether the word is derived from a verb.

 

 
  [ # 9 ]

Thats Don. I guess ‘What was the fighting about?’ is really using a noun form.

Bruce can you expound on isopropogate a bit more? I asked about it in my last post and you didn’t really mention it. Thanks.

 

 
  [ # 10 ]
Don Patrick - Apr 2, 2015:

Pronouns “he” and verbs “work” never have a determiner applied to them.

While instances are decidedly rare, there are occasions where a determiner is “attached” to a pronoun. Here’s an example:

Bill: Sandy sounds so nice on the phone. I wonder if she’s single.
Doug: Haha! Sandy is a “he”.
Bill: Oops?

 

 
  [ # 11 ]

Nice exception, Dave smile. At this point I wonder if that “he” is still a pronoun gramatically, since it is used as a synonym for “male”. Weird. Granted though, I haven’t encountered many rules of English language that didn’t have exceptions to them.

 

 
  [ # 12 ]

for unipropogate, the documentation in the manual is obsolete. I have now removed it.  One would have to consult LIVEDATA/SYSTEM/queries.txt for the currently valid queries and some minimal documentation.

 

 
  login or register to react
‹‹ missingsets.txt      JSON data in CS Postgres ››