Natural Language to Sparql Query Language
Competency questions analysis available at this link
The SequenceExtract.py script attempts to isolate the predicates and entities that make up questions, while ExtendedSequenceExtract.py provides meaningful grammatical and syntactic analysis.
Let's consider the following question "What are the topics of a song?". This question will processed to produce the following outputs:
File | Output |
---|---|
SequenceExtraction.py | {'question': 'Which', 'predicate1': 'are', 'entity1': 'topics', 'entity2': 'song'} |
ExtendedSequenceExtract.py | ['Which', 'TO-BE-VERB', 'NOUN', 'of', 'NOUN'] |
LodeExtractor.py | example notebook |
ToSPARQL.py | SELECT ?topics WHERE { ?topics <https://songstopoems.github...owl#appears_in> ?song . ?topics hasType <htt://songstopoems.github...owl#Topic> . ?song hasType <https://songstopoems.github...owl#Song> . } |