Hint: Always stop KIM with \bin\stopKIM.bat to prevent possible data corruption (in the OWLIM semantic database).
Hint: On Linux use the ".sh" extension, not ".bat" to run the scripts.
1. Use KIM-GATE UI
This will start both Sheffield GATE(gate.ac.uk) developer and the Ontotext KIM server. GATE developer is a Java desktop application that communicates with the KIM server automatically.
Use \bin\startKIMGate.bat(sh) to start it and it will load the KIM's default information extraction pipeline which actually has no name, you will see it as "Conditional Corpus Pipeline".

With the KIM/GATE developer you can start annotating documents. Simply said by annotating documents I mean that you will be able to see your documents marked with different colors. Every color will be an annotation, where an annotation can be: personal name, location, time, job position ... etc.
You need to:
- read the GATE documentation, watch the following flash movies.
- know that "Corpus" is a funky name for a bunch of documents. You populate a corpus with documents and then you annotate the corpus - actually the documents in it.
- explore the GATE architecture for things like: "processing resource"/"gate plug-in", "gate application" ... not that many
- know that the GATE developer(from the KIM package) starts with a default application, but when you download GATE from the GATE website, you need to load GATE's default application(pipeline) from the menus with "Load ANNIE with defaults".
2. Import documents through the KIM populator tool
You need to start the KIM server first with \bin\startKIM.bat(sh).(not start startKIMGate.bat!)

Then start \bin\tools\toolPopulate.cmd which on Windows starts the populator with a classic Windows UI.
Point to a folder that contains text or html documents. Press "Start".
This tool will call the "AddDocument" method from the KIM Document Repository API. Usually this method can be configured what operations to be performed when called. It's default behavior is to:
- create a full-text search index over the document
- extract entities and add them to the OWLIM semantic database
Technical remarks:
Both the standalone KIM server(startKIM.bat) and the GATE developer(from the KIM installation) can work in the same time(startKIMGate.bat), but the populator tool needs a running KIM instance - it does not start one for you. You can not start the GATE developer(from the KIM installation) only and expect the populator tool to work.
The see your results you should whether use the KIM WEB UI (see point 4) or the Sesame WEB UI(see part 5) to make queries. “results” means entities, triples, etc.
3. Write a JAVA program that connects to KIM
You can perform semantic annotation make, queries(SeRQL, SPARQL only in 3.0) through a JAVA API. You can also search through KIM Document Repository full text search index.
Please check:
Gate tutorial - KIM part 3
Using a Gate application - KIM part 4
The see your results you can do that programmatically again or use:KIM WEB UI (see point 4) or the Sesame WEB UI(see part 5) to make queries.
4. Explore KIM standard front-end UI
You need Tomcat to start the default WEB UI. I have to admit that many efforts have been put in making this interface really good.
Copy KIM.war from KIM Clients to Tomcat's \webapps.
Start KIM with \bin\startKIM.bat(sh).
Start Tomcat.
With you browser open: http://localhost:8080/KIM/

To try the latest version of the user-interface - visit: latest_news.semanticannotation.com
Many of the features will be disable because KIM 2.4 requires CORE(CORE = Co-Occuring and Ranking of Entities) over a relational database. So a version of Oracle is required. Please check the documentation on How to enable CORE DB with Oracle. Future versions of KIM will be less dependent on Oracle.
5. Use the Aduna Sesame Web UI to write semantic queries
Start Sesame: \bin\startSesame.bat. You do not need to have the KIM server running - see below.
Copy sesame-web-ui.war from \KIM Clients\ to your Tomcat's \webapps folder.
Start Tomcat.
You may experience a problem with Tomcat. This if you have KIM.war deployed. When you start it Tomcat will try to run the KIM.war and if you do not have a KIM instance running this will result in some error messages. This is fixed by either starting KIM(startKIM.bat) or removing kim.war and the KIM folder from webapps in Tomcat. If you remove them then do not forget to add them again next time you try to use the KIM UI.
Start your browser and point it to http://localhost:8080/sesame-web-ui.
Now you probably need to press "Go >>" from the UI to confirm the KIM seasame server.
Next enter the default username/password: admin/admin.

Click on the top on "SeRQL-S" to enter a new select query. Keep in mind that this is a SeRQL query, not SPARQL.
SELECT company, name FROM
{company} <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> {<http://proton.semanticweb.org/2006/05/protonu#Company>},
{company} <http://proton.semanticweb.org/2006/05/protons#hasMainAlias> {alias},
{alias} <http://www.w3.org/2000/01/rdf-schema#label> {name}
This query will first display the company URI in the semantic database that uniquely identifies each company and the second column is the main name that this company is known by. More that 7000 comapnies should be dispalyed from KIM's default knowledge base.
Note: When you use startSesame.bat you start a new OWLIM instance. When you have started a KIM server, you also have OWLIM server running inside KIM. So you might end up with two OWLIM servers running, but that's OK as they are configured on different ports.
Conclusion:
Next step is the KIM documentation itself.
If you have any problems please use the Google Ontotext search engine or/and subscribe to the kim-discussion mailing list.
Quick links:
The Semantic Annotation Workflow - KIM part 10
KIM Multi-threaded Clustered Client Application - KIM part 9
Gazetteers - KIM/GATE part 7
Strict Rules vs Machine Learning - KIM part 6
Tips and Tricks - KIM part 5
Using a Gate application - KIM part 4
Gate tutorial - KIM part 3
Using KIM from .NET - KIM part 2
Getting Started - KIM part 1
Installation - KIM part 0





