Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question types in editor not working #25

Open
mariusursache opened this issue Jun 30, 2015 · 2 comments
Open

Question types in editor not working #25

mariusursache opened this issue Jun 30, 2015 · 2 comments

Comments

@mariusursache
Copy link

I have only one gambit defined:

image

However, it is not triggered by any WH question. I am looking at the debug console, and the question "What is this" is parsed as a WH question, so I guess that the fact the editor gambit is not working, might have to do with the way the editor creates the gambit.

Here's the debug log, just in case:

  engine:ws writing "3" +0ms
  engine:ws received "42["chat message","What is this?"]" +3s
  engine:socket packet +0ms
  socket.io-parser decoded 2["chat message","What is this?"] as {"type":2,"nsp":"/","data":["chat message","What is this?"]} +46s
  socket.io:socket got packet {"type":2,"nsp":"/","data":["chat message","What is this?"]} +47s
  socket.io:socket emitting event ["chat message","What is this?"] +2ms
  Script Message Recieved from 'testUser' +46s What is this?
  mquery findOne +46s users { id: 'testUser' } { fields: undefined }
  Message Creating message from: +46s What is this
  Message fullnames +240ms names []
  Message Fetch List +0ms
  Message fullnames +10ms nouns []
  Message Message +0ms { id: 'SfsTV6fv',
  facts: 
   { conceptToList: [Function],
     findParentConcepts: [Function],
     create: [Function],
     db: 
      { breadthFirst: [Function: breadthFirst],
        deepFirst: [Function: deepFirst] },
     createUserDB: [Function],
     createUserDBWithData: [Function],
     loadFile: [Function] },
  createdAt: Tue Jun 30 2015 20:49:18 GMT+0300 (EEST),
  raw: 'What is this',
  props: {},
  clean: 'What is this',
  dict: { words: [ [Object], [Object], [Object] ] },
  words: [ 'What', 'is', 'this' ],
  cwords: [ 'What', 'is', 'this' ],
  taggedWords: 
   [ [ 'What', 'WP' ],
     [ 'is', 'VBZ' ],
     [ 'this', 'DT' ],
     pushUnique: [ [Function], [Function] ],
     chunk: [ [Function], [Function] ] ],
  lemWords: [ 'what', 'be', 'this' ],
  lemString: 'what be this',
  posString: 'WP VBZ DT',
  qtype: 'DESC:def',
  qSubType: 'WH',
  isQuestion: true,
  sentiment: 0,
  nouns: [],
  names: [],
  list: [],
  adjectives: [],
  adverbs: [],
  verbs: [ 'be' ],
  pnouns: [],
  pronouns: [],
  compareWords: [],
  numbers: [],
  compare: false,
  date: null,
  cNouns: [],
  numericExp: false,
  halfNumericExp: false,
  entities: [] }
  mquery find +542ms topics { system: { '$ne': true } } { fields: undefined }
  User getTopic +47s random
  GetReply Topics to check +47s [ '__pre__', 'random', '__post__' ]
  mquery findOne +8ms topics { name: '__pre__' } { fields: undefined }
  mquery findOne +1ms topics { name: 'random' } { fields: undefined }
  mquery find +1ms gambits { _id: { '$in': [ 5592d587d0bb9e081f3946d2 ] } } { fields: undefined }
  Topics FindMatch +47s random
  mquery findOne +4ms topics { name: 'random' } { fields: { gambits: 1 } }
  mquery find +1ms gambits { _id: { '$in': [ 5592d587d0bb9e081f3946d2 ] } } { fields: undefined }
  mquery find +1ms replies { _id: { '$in': [ 5592d5a3d0bb9e081f3946d3 ] } } { fields: undefined }
  Topics Try to match (clean)'What is this' against (?:.*?) ((?:.*?)) topic: random or prevMatch +5ms
  Topics Try to match (lemma)'what be this' against (?:.*?) ((?:.*?)) topic: random or prevMatch +0ms
  mquery findOne +3ms topics { name: '__post__' } { fields: undefined }
  Message Creating message from: +22ms 
  Message Callback Early, empty msg +0ms
  User Updating History +15ms
  Script Update and Reply to user 'testUser' +585ms { replyId: undefined,
  createdAt: Tue Jun 30 2015 20:49:18 GMT+0300 (EEST),
  string: '',
  gambitId: undefined,
  topicName: undefined }
  mquery findOne +24ms topics { name: undefined } { fields: undefined }
null
  socket.io:client writing packet {"type":2,"data":["chat message",{"createdAt":"2015-06-30T17:49:18.330Z","string":""}],"nsp":"/"} +587ms
  socket.io-parser encoding packet {"type":2,"data":["chat message",{"createdAt":"2015-06-30T17:49:18.330Z","string":""}],"nsp":"/"} +590ms
  socket.io-parser encoded {"type":2,"data":["chat message",{"createdAt":"2015-06-30T17:49:18.330Z","string":""}],"nsp":"/"} as 2["chat message",{"createdAt":"2015-06-30T17:49:18.330Z","string":""}] +1ms
@mariusursache
Copy link
Author

Some more thoughts:

  1. The generic question gambit works.
  2. This is related to a previous question I asked, regarding on how to enter answer types in the editor (for example ?:LOC:city)

@mariusursache
Copy link
Author

Related to #17 and #18 somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant