View lila_0_2.php
<html>
<head>
<title>Lila Prototype 0.2 - johnmiedema.com</title>
</head>
<body>
<?php
//References
//https://gist.github.com/chasewoodford/51e185ed1d49862bf988
//https://developers.google.com/chart/interactive/docs/gallery/linechart
View EvernoteRandom
<?php
/*
--------------------------------------------------------------------------
EVERNOTE RANDOM
Use with IFTTT.com to get a daily random evernote note sent to your email
When link is opened, view it in your Evernote app
Edit a note daily to keep up on them all
--------------------------------------------------------------------------
Requirements:
View demoExtractSolrQueryResponseData
//Extract SolrQuery response data
//johnmiedema.com
package demoCrawlIndexQuery;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
View TestCustomOpenNlpModel
//Test a custom OpenNLP model for NER of book titles
//See https://gist.github.com/johnmiedema/4020deea875ce306971e
package demoModelTrainer;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import opennlp.tools.namefind.NameFinderME;
View OpenNlpModelNERBookTItles
//Create an OpenNLP model for Named Entity Recognition of Book Titles
//See tester at https://gist.github.com/johnmiedema/7e7330e1b9263267bdfc
package demoModelTrainer;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Collections;
import opennlp.tools.namefind.NameFinderME;
View RecognizeNamesOpenNLPNameFinder
package demoNameFind;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import opennlp.tools.namefind.NameFinderME;
import opennlp.tools.namefind.TokenNameFinderModel;
import opennlp.tools.tokenize.Tokenizer;
import opennlp.tools.tokenize.TokenizerME;
View extractNounPhrasesOpenNLP
package demoParseNounPhrases;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Set;
import opennlp.tools.cmdline.parser.ParserTool;
import opennlp.tools.parser.Parse;
View ApacheTikaSolrIndexSearch
//Use Apache Tika and Solr to crawl, index and search documents
//John Miedema http://johnmiedema.com
//-----------------------------------------------------------
//referenced libraries:
//Apache Tika 1.5
//Apache Solr 4.7.2
//Apache HttpClient 4.3.3 reqd to connect to Solr server
//Noggit json parser reqd for Solr commands
//-----------------------------------------------------------
//after Solr is downloaded, start it using the following commands
View ApacheTikaMetadataConvertPlainText
//Use Apache Tika to extract metadata and convert different content types into plain text
//'Whatson' blog series at johnmiedema.com
//http://johnmiedema.com/?tag=whatson
//source documents include different content types
processDocument(&quot;resources/mobydick.htm&quot;);
processDocument(&quot;resources/robinsoncrusoe.txt&quot;);
processDocument(&quot;resources/callofthewild.pdf&quot;);
private static void processDocument(String pathfilename) {
View tokenizeUsingOpenNLP
//Tokenizing content using OpenNLP
//'Whatson' blog series at johnmiedema.com
//http://johnmiedema.com/?tag=whatson
//select tokenizer model, in this case a pre-trained model from OpenNLP
//custom models can be built for unique whitespace handling requirements
InputStream modelIn = new FileInputStream("en-token.bin");
try {
//load the model