sempre icon indicating copy to clipboard operation
sempre copied to clipboard

Is it recommended to work with SEMPRE on windows

Open Rajskc opened this issue 6 years ago • 11 comments

Hi, I have gone through some closed issues, it says there can be problems when working on windows. I wanted to know if it is recommended to work on windows? Thanks.

Rajskc avatar Jan 24 '19 07:01 Rajskc

Hi. Unfortunately, we don't fully support Windows. The code is generally in Java which works cross-platform, but there are some pipeline scripts (./pull-dependencies, ./run) that might not work well in Windows. Installing Virtuoso might also be more difficult.

Using a UNIX-like shell such as Cygwin on Windows might work, but we haven't tested on that.

ppasupat avatar Jan 25 '19 00:01 ppasupat

The scripts are written in ruby. If you have ruby on Windows, you could try running the following commands in https://github.com/percyliang/sempre#easy-setup with ruby:

  • ruby pull-dependencies core for step 2
  • ruby scripts/extract-module-classes.rb after step 3
  • ruby run @mode=simple for step 4

The extract-module-classes.rb one would have been run when compiling with ant, but I'm not sure if it works under Windows without calling ruby explicitly.

ppasupat avatar Jan 25 '19 00:01 ppasupat

Thanks for your reply. I am thinking of using ubuntu to work. Can I use ubuntu virtual machines or should I dual boot my windows system? Which one is better to work?

Rajskc avatar Jan 25 '19 08:01 Rajskc

It depends on your usage, but since SEMPRE can use a lot of RAM, dual boot might be better.

ppasupat avatar Jan 25 '19 09:01 ppasupat

I have dual booted my system with linux mint. I am still not able to get through this command:

$ ./pull-dependencies core bash: ./pull-dependencies: No such file or directory

It seems that ruby is not able to recognise this command, Is that the problem?

Rajskc avatar Jan 29 '19 11:01 Rajskc

Are you in the root directory of SEMPRE, which is where pull-dependencies is located? Otherwise, try reinstalling ruby.

ppasupat avatar Jan 29 '19 11:01 ppasupat

Sorry, My bad. I am able to install and test the sample function successfully. Thanks a lot for your quick reply.

Rajskc avatar Jan 29 '19 13:01 Rajskc

Hi,

I have a couple of queries:

  1. We are creating rules to get semantic understanding currently, instead of that can we use domain specific Ontological Libraries to get more context based understanding?

  2. How can we handle spelling mistakes in the text input?

Rajskc avatar Jan 31 '19 09:01 Rajskc

  1. There are a few ways to incorporate domain-specific knowledge, such as adding features or putting the information in the knowledge base. Would you mind elaborating on what you would like to do?

  2. The framework does not handle misspellings. In theory, the capability could be added to the language analyzer as a preprocessing step, but that requires a trained spelling correction system.

ppasupat avatar Feb 01 '19 00:02 ppasupat

  1. The goal is to get semantic understanding with the help of domain specific knowledge. Can we use our own ontology along with Free base or replace freebase with your own ontology and get some information?

Also, are there any generic rules existing to define entities, instead of writing them from scratch?

Rajskc avatar Feb 01 '19 11:02 Rajskc

  • You can load in your custom ontology in place of Freebase. If you are following the tutorial, replace the small demo graph (freebase/data/tutorial.ttl) with your ontology
  • For parsing into SPARQL, the entities have to be defined explicitly. Refer to the parsing section of the tutorial. In short, you can create a JSON mapping from phrases to database entities, and then use a SimpleLexiconFn rule to invoke them during parsing. The command for invoking SEMPRE should include options to take in the JSON file (see the "interactive prompt" in that section).

ppasupat avatar Feb 04 '19 19:02 ppasupat