Skip to content

the-anaphora-resolution/geographic-query-processor-hindi

Repository files navigation

Geographic Question-Answering System for Hindi Language

Code Description:


The following codes are present in the RuleBasedSystem directory
  • rule.py
    Program to process the input query (present in hindiQuery.txt) through a set of rules and transform it to a predicate of property-NER pair. This program determines the slots to be filled in the PostgreSQL query

  • db_interface.py
    Program to convert the query generated by rule.py to a PostgreSQL query, and fetch the result from the database. The program displays the result in Hindi using Google Translate API

  • main.py
    Main Program which executes all the required codes in squence. This program:

    • Reads the input query from hindiQuery.txt
    • Executes rule.py to generate the intermediate query, and stores it in query_info.txt
    • Executes db_interface.py which reads the intermediate query and based on the property, executes a specific PostgreSQL query to fetch the result

Instructions:


1. Setup PostgreSQL database:
  • Install PostgreSQL
  • Install the extension PostGIS
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
  • Import the database from db/create_db.sql
  • Import all the .csv files present in db directory to your database
2. Install necessary Python Libraries:
  • Install Google API Python Client Library
pip install google-api-python-client
  • Install PostgreSQL+Python
pip install psycopg2
3. Execution:
  • Write your question in Hindi in RuleBasedSystem/hindiQuery.txt
  • Execute RuleBasedSystem/main.py
4. Additional Instructions to install and use Hindi Wordnet:
  • switch to JHWNL_1_2 directory
  • Compile all files here:
javac -cp JHWNL.jar:. *.java
  • Execute GetSynonyms.java to get the list of synonyms of an input Hindi word
java -cp JHWNL.jar:.  GetSynonyms

About

Educational Geographic Query Processor for Hindi Language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •