opennlp FSU Jena
Gliederung 1 Gratulation! Einschub: Apache Software Foundation Übersicht 2 Allgemein Einzelne Tools 3 Performance Zusammenfassung
opennlp Gratulation! Einschub: Apache Software Foundation Übersicht http://opennlp.apache.org/index.html
Gratulation! Gratulation! Einschub: Apache Software Foundation Übersicht
Apache Software Foundation Gratulation! Einschub: Apache Software Foundation Übersicht The Apache Software Foundation provides organizational, legal, and financial support for a broad range of open source software projects. The Foundation provides an established framework for intellectual property and financial contributions that simultaneously limits contributors potential legal exposure. Through a collaborative and meritocratic development process, Apache projects deliver enterprise-grade, freely available software products that attract large communities of users. The pragmatic Apache License makes it easy for all users, commercial and individual, to deploy Apache products. http://www.apache.org/foundation/
Projekte der Apache Foundation Gratulation! Einschub: Apache Software Foundation Übersicht Beispiele für Projekte: Apache Webserver Ant Maven UIMA Lucene http://projects.apache.org/indexes/alpha.html
Apache Lizenz Gratulation! Einschub: Apache Software Foundation Übersicht Lizenz: Ähnelt BSD Lizenz Beinhaltet Gewährung einer Patent Lizenz http://www.apache.org/licenses/license-2.0.txt
Finanzierung der Apache Foundation Gratulation! Einschub: Apache Software Foundation Übersicht Einige Förderer: Google Microsoft Facebook IBM http://www.apache.org/foundation/thanks.html
Was beinhaltet opennlp? Gratulation! Einschub: Apache Software Foundation Übersicht Sentence Detector Tokenizer Named Entity Recognition POS-Tagger Chunker Parser Coreference Resolution Dokumenten Klassifizierer Konverter für verschiedene Korpora
Prinzip Gratulation! Einschub: Apache Software Foundation Übersicht (Fast) Alle Tools benötigen oder produzieren Modelle Modelle beinhalten gewichtete Entscheidungskriterien für die Zuordnung eines Phänomens zu einer Klasse Verwendete Modelle: Maximum Entropy und Perzeptron Fertige Modelle finden sich unter http://opennlp.sourceforge.net/models-1.5
Kommandozeile oder API Allgemein Einzelne Tools Im lib Ordner finden sich Skripte für Windows und Linux um opennlp über Kommandozeile zu verwenden Alternativ kann das opennlp.jar auch direkt in Java Programme eingebunden werden Für UIMA gibt es fertige Wrapper
Training und Evaluation Allgemein Einzelne Tools Die meisten Tools gibt es auch in einer Trainingvariante zum erstellen neuer Modelle Einige Tools bieten auch eine Evaluationsfunktion (teilweise auch Kreuzvalidierung) Sinnvolles Trainingsmaterial ist umfangreich (für Namefinder werden 15k Sätze empfohlen)
Allgemein Einzelne Tools Vorbemerkung zur Kommandozeile Die meisten Tools werden über opennlp TOOL MODEL < INPUT > OUTPUT benutzt < liest eine Datei ein und übergibt sie opennlp >schreibt das Ergebnis in eine Datei (wird bei Bedarf erstellt) < und >können weggelassen werden, dann Ein- und Ausgabe über Kommandozeile macht den Output eines Programms zum Input des nächsten
SentenceDetector Allgemein Einzelne Tools Input: Bees are flying insects closely related to wasps and ants, and are known for their role in pollination and for producing honey and beeswax. Bees are a monophyletic lineage within the superfamily Apoidea, presently classified by the unranked taxon name Anthophila. Output: Bees are flying insects closely related to wasps and ants, and are known for their role in pollination and for producing honey and beeswax. Bees are a monophyletic lineage within the superfamily Apoidea, presently classified by the unranked taxon name Anthophila.
TokenizerME Allgemein Einzelne Tools Input: Bees are flying insects closely related to wasps and ants, and are known for their role in pollination and for producing honey and beeswax. Output: Bees are flying insects closely related to wasps and ants, and are known for their role in pollination and for producing honey and beeswax. Bemerkung: Es gibt auch den nicht lernfähigen (ohne Model) SimpleTokenizer. Dieser trennt etwa 20,000 known species auf in 20, 000 known species.
POSTagger Maximum Entrpoy Model Allgemein Einzelne Tools Input: Bees are flying insects closely related to wasps and ants, and are known for their role in pollination and for producing honey and beeswax. Bees... Output: Bees_NNP are_vbp flying_vbg insects_nns closely_rb related_vbn to_to wasps_nns and_cc ants_nns,_, and_cc are_vbp known_vbn for_in their_prp$ role_nn in_in pollination_nn and_cc for_in producing_vbg honey_nn and_cc beeswax_nn._. Bees_NNPS... Bemerkung: NNP(S) = Eigenname (im Plural)
ChunkerME mit ME-POS als Input Allgemein Einzelne Tools Input: Bees_NNP are_vbp flying_vbg insects_nns closely_rb related_vbn to_to wasps_nns and_cc ants_nns,_, and_cc are_vbp known_vbn for_in their_prp$ role_nn in_in pollination_nn and_cc for_in producing_vbg honey_nn and_cc beeswax_nn._. Output: [NP Bees_NNP ] [VP are_vbp flying_vbg ] [NP insects_nns ] [VP closely_rb related_vbn ] [PP to_to ] [NP wasps_nns and_cc ants_nns ],_, and_cc [VP are_vbp known_vbn ] [PP for_in ] [NP their_prp$ role_nn ] [PP in_in ] [NP pollination_nn ] [PP and_cc ] [PP for_in ] [VP producing_vbg ] [NP honey_nn and_cc beeswax_nn ]._.
Parser scheint den Rest nicht zu nutzen? Allgemein Einzelne Tools Input: Bees are flying insects closely related to wasps and ants, and are known for their role in pollination and for producing honey and beeswax. Output: (TOP (S (S (S (S (NP (NNP Bees)) (VP (VP (VBP are) (VP (VBG flying) (NP (NNS insects)) (ADJP (RB closely) (VBN related) (PP (TO to) (NP (NNS wasps) (CC and) (NNS ants)))))) (,,) (CC and) (VP (VBP are) (VP (VBN known) (PP (PP (IN for) (NP (NP (PRP$ their) (NN role)) (PP (IN in) (NP (NN pollination))))) (CC and) (PP (IN for) (S (VP (VBG producing) (NP (NN honey) (CC and) (NN beeswax) (..)
Parser nutzt ihn intern doch! Allgemein Einzelne Tools public ParserModel(String languagecode, AbstractModel buildmodel, AbstractModel checkmodel, AbstractModel attachmodel, POSModel parsertagger, ChunkerModel chunkertagger, opennlp.tools.parser.lang.en.headrules headrules, ParserType modeltype, Map<String, String> manifestinfoentries) {... opennlp.tools.parser.parsermodel
Performance auf ca. 2007er Hardware Performance Zusammenfassung Korrektheit stets vom verwendeten Model (und damit den Trainingsdaten) abhängig Das Laden der Modelle kostet Zeit (17 sec für das 35MB en-parser-chunking) Die eigentliche Laufzeit variiert zwischen 10sec für den Parser und und 0,01sec für den SentenceDetector (für 328 Wörter)
Performance Zusammenfassung opennlp stellt für die meisten Aufgaben Tools zur Verfügung Nutzung über Kommandozeile oder API möglich Für Deutsch gibt es nur wenige Modelle Dokumentation ausbaubar