machinalis / quepy

A python framework to transform natural language questions to queries in a database query language.
Other
1.25k stars 296 forks source link

How to call quepy.install("") for multiple modules / languages? #48

Open tim5go opened 7 years ago

tim5go commented 7 years ago

I am trying to create my own RDF module based on dbpedia in Chinese.

In my dsl.py, we created something like:

HasKeyword.relation = "rdfs:label" HasKeyword.language = "zh"

However, when I created two RDF modules simultaneously in the constructor of main class:

self.dbpedia = quepy.install("dbpedia") self.zhwiki = quepy.install("zhwiki") # Chinese version of dbpedia

I found that the latter module that I created will always override the first one.

In particular, the dsl.py for dbpedia look likes:

HasKeyword.language = "en"

And the variable "HasKeyword.language" will be overrided as "zh"

Is there any good way to resolve it?