This project computes a coordinate from user input.
This software has only been tested on Linux.
To run it, you need the following installed:
- php5-cli (
sudo apt-get install php5-cli
) - php5-curl (
sudo apt-get install php5-curl
) - Java 1.8 or later
Everything else you need should be included in this repository.
There are two ways you can try this program. The simplest is from the command line.
cd
into the root directory of this project. (The same directory that contains this README file.)- Run
php -f SimpleRun.php "<text>"
, replacing<text>
with the text you want to locate. (But keep the"
around the text!) - Output will be printed to the command line.
- If you want to try another text, repeat step 2.
This still needs some command line work to get it set up.
- From the command line,
cd
into the root directory of this project. (The same directory that contains this README file.) - From the command line, enter
php -S localhost:8000
. This sets up a local server so you can view the program from a browser. - From your internet browser, go to
http://localhost:8000/GeotaggerHome.php
. - Type in your text to the Text field of the webpage.
- Click Submit.
- You will be brought to another page which gives the full output of my progam. (There are more details than you probably need.) The final results should be at the bottom of the page.
- If you want to try another text, repeat steps 3-5.
This section describes what each file or folder in this repository is used for.
- PHP-Stanford-NLP folder: A PHP wrapper for the Stanford software from https://github.com/agentile/PHP-Stanford-NLP.
- stanford-ner-2015-04-20 folder: The Stanford Named Entity Recognizer (NER) from http://nlp.stanford.edu/software/CRF-NER.shtml.
- stanford-postagger-2015-04-20 folder: The Stanford Part of Speech tagger (POS) from http://nlp.stanford.edu/software/tagger.shtml.
- ActionPage: Landing page when using the geotagger from a browser.
- CompareDisambiguators: Code that is currently being used to run tests.
- Connectivity.php: Code from Spotzi to help with the connection to Nominatim.
- Date.php: Code from Spotzi that is required by ErrorHandler.php.
- Disambiguate.php: Code to disambiguate between search results.
- ErrorHandler.php: Code from Spotzi that is required by Connectivity.php.
- Geotagger.php: The main file that sends text to each of the other pieces.
- GeotaggerHome.php: A web page for running the geotagger from a brower.
- SimpleRun.php: This provides a simple example for how to run the program.
- Terms.php: Code to handle phrases in the text that are being searched, along with metadata about them.
- TestTerms.php: Some unit tests for Terms.php.
- TextParser: Finds potential locations in the text using the Stanford software.