What about Shame is not working

40 views
Skip to first unread message

Fernando Benites

unread,
Nov 8, 2016, 8:13:42 AM11/8/16
to Quepy
Hello!

The project is great!
You can easily create new patterns for new question.
However, in my installation What about Shame? does not work.
In the demo it works, anybody an idea why?
Also debugging the repo virtualmachine is relatively hard. Any hints how can I
find out, debug, visualize, why a certain expression do not match?

My minimal example:

import quepy
dbpedia = quepy.install("dbpedia")
target, query, metadata = dbpedia.get_query("What is Shame about?")
print query
#None


Cheers,
Fernando

PS: My system is ubuntu 16.04 with python 2.7.12

Fernando Benites

unread,
Nov 10, 2016, 7:33:15 AM11/10/16
to Quepy
ok fount out the error:
Shame was tagged as VBG, (do not know why).
Also for debugging I recmmend:

    logger = logging.getLogger("quepy.quepyapp")
    myhandler = logging.StreamHandler()  # writes to stderr
    myhandler.setLevel(logging.WARNING)
    myformatter = logging.Formatter(fmt='%(levelname)s: %(message)s')
    myhandler.setFormatter(myformatter)
    logger.addHandler(myhandler)

also "quepy.parsing" can be used.
Cheers,
Fernando

Gonzalo García Berrotarán

unread,
Nov 10, 2016, 8:48:15 AM11/10/16
to qu...@googlegroups.com
Sorry for the late response and i'm happy that you found the issue.

Quepy comes with a tool to display the tags of a question to help you debug why your regex aren't matching. Use:

quepy tag <app_name> <text>

Using your app and the text of your question, and you'll get how each word is being tagged with.
Hope this helps debug future issues!

--
You received this message because you are subscribed to the Google Groups "Quepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quepy+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Gonzalo García Berrotarán - Developer
Reply all
Reply to author
Forward
0 new messages