[JAVA] NLP4J NLP4J + Twitter4J (Analyse 1)

Zurück zum Index: [005-1] NLP4J + Twitter4J (Datenerfassung) > this> Nächste Seite

Schauen Sie sich die Ergebnisse an

Der vollständige Text des Ausgabeergebnisses befindet sich unter hier.

Nun wollen wir das Ergebnis sehen ...

Verarbeitungszeit

Verarbeitungszeit[ms]:34586

Es dauert 34 Sekunden. Es ist ziemlich langsam. Insgesamt gibt es 90 Dokumente, aber ich denke, das liegt daran, dass jedes Dokument die API von Yahoo zweimal und insgesamt 180 Mal aufruft. Die API zur Verarbeitung natürlicher Sprache von Yahoo ist einfach zu verwenden. Angesichts der Häufigkeit und Leistung ist es jedoch erforderlich, eine Bibliothek zu verwenden, die lokal aufgerufen werden kann.

NLP4J bietet eine Funktion zum Umschließen anderer Bibliotheken zur Verarbeitung natürlicher Sprache, daher möchte ich sie später implementieren. [Wann? ]]

Nach Häufigkeit der Nomenklatur

count=117,facet=Substantiv,lex=co
count=117,facet=Substantiv,lex=https
count=76,facet=Substantiv,lex=2019
count=50,facet=Substantiv,lex=TMS
count=40,facet=Substantiv,lex=Tokyo Motor Show
count=30,facet=Substantiv,lex=Nissan
count=30,facet=Substantiv,lex=RT
count=29,facet=Substantiv,lex=2
count=28,facet=Substantiv,lex=HondaTMS
count=25,facet=Substantiv,lex=1
count=24,facet=Substantiv,lex=3
count=24,facet=Substantiv,lex=4
count=22,facet=Substantiv,lex=6
count=22,facet=Substantiv,lex=TOYOTA
count=21,facet=Substantiv,lex=Stand
count=20,facet=Substantiv,lex=5
count=19,facet=Substantiv,lex=Hier
count=18,facet=Substantiv,lex=Honda
count=18,facet=Substantiv,lex=8
count=16,facet=Substantiv,lex=Toyota
count=15,facet=Substantiv,lex=10
count=14,facet=Substantiv,lex=Spieler
count=14,facet=Substantiv,lex=Zukunft
count=14,facet=Substantiv,lex=Sehen
count=12,facet=Substantiv,lex=9
count=12,facet=Substantiv,lex=Erfahrung
count=12,facet=Substantiv,lex=NissanTMS
count=11,facet=Substantiv,lex=Mit allen Mitteln
count=10,facet=Substantiv,lex=Tagungsort
count=10,facet=Substantiv,lex=passen
count=10,facet=Substantiv,lex=Warten
count=10,facet=Substantiv,lex=PR

Da die Tokyo Motor Show stattfindet, haben "TMS", "Tokyo Motor Show", "Future" usw. einen hohen Stellenwert.

"Co" und "http" sind also die höchsten, also ist es ärgerlich. .. Anscheinend behandelt die API zur Verarbeitung natürlicher Sprache von Yahoo "URL" nicht anders. Auch Zahlen wie "2019" fallen auf. Die API zur Verarbeitung natürlicher Sprache von Yahoo scheint eine Spezifikation zu sein, die keine "Zahlen" zurückgibt.

Überprüfen Sie die morphologische Analyse von Yahoo

Mal sehen, was das Ergebnis für URLs und Zahlen ist.

//Natürlicher Text
String text = "http://www.yahoo.co.jp/ist. Ich nahm 100 Yen auf.";
//Japanische morphologische Analyse
YJpMaService service = new YJpMaService();
//Holen Sie sich das Ergebnis der morphologischen Analyse
ArrayList<Keyword> kwds = service.getKeywords(text);
//Geben Sie alle Schlüsselwörter aus
for (Keyword kwd : kwds) {
	System.out.println(kwd);
}

http [sequence=1, facet=Substantiv, lex=http, str=http, reading=http, count=-1, begin=0, end=4, correlation=0.0]
: [sequence=2, facet=Besondere, lex=:, str=:, reading=:, count=-1, begin=4, end=5, correlation=0.0]
/ [sequence=3, facet=Besondere, lex=/, str=/, reading=/, count=-1, begin=5, end=6, correlation=0.0]
/ [sequence=4, facet=Besondere, lex=/, str=/, reading=/, count=-1, begin=5, end=6, correlation=0.0]
www [sequence=5, facet=Substantiv, lex=www, str=www, reading=www, count=-1, begin=7, end=10, correlation=0.0]
. [sequence=6, facet=Besondere, lex=., str=., reading=., count=-1, begin=10, end=11, correlation=0.0]
yahoo [sequence=7, facet=Substantiv, lex=yahoo, str=yahoo, reading=yahoo, count=-1, begin=11, end=16, correlation=0.0]
. [sequence=8, facet=Besondere, lex=., str=., reading=., count=-1, begin=16, end=17, correlation=0.0]
co [sequence=9, facet=Substantiv, lex=co, str=co, reading=co, count=-1, begin=17, end=19, correlation=0.0]
. [sequence=10, facet=Besondere, lex=., str=., reading=., count=-1, begin=19, end=20, correlation=0.0]
jp [sequence=11, facet=Substantiv, lex=jp, str=jp, reading=jp, count=-1, begin=20, end=22, correlation=0.0]
/ [sequence=12, facet=Besondere, lex=/, str=/, reading=/, count=-1, begin=22, end=23, correlation=0.0]
  [sequence=13, facet=Besondere, lex= , str= , reading= , count=-1, begin=23, end=24, correlation=0.0]
ist[sequence=14, facet=Hilfsverb, lex=ist, str=ist, reading=ist, count=-1, begin=24, end=26, correlation=0.0]
。 [sequence=15, facet=Besondere, lex=。, str=。, reading=。, count=-1, begin=26, end=27, correlation=0.0]
100 [sequence=16, facet=Substantiv, lex=100, str=100, reading=100, count=-1, begin=27, end=30, correlation=0.0]
Kreis[sequence=17, facet=Suffix, lex=Kreis, str=Kreis, reading=Yen, count=-1, begin=30, end=31, correlation=0.0]
abholen[sequence=18, facet=Verb, lex=abholen, str=Abholen, reading=Breit, count=-1, begin=31, end=33, correlation=0.0]
Masu[sequence=19, facet=Hilfsverb, lex=Masu, str=Besser, reading=Besser, count=-1, begin=33, end=35, correlation=0.0]
Ta[sequence=20, facet=Hilfsverb, lex=Ta, str=Ta, reading=Ta, count=-1, begin=35, end=36, correlation=0.0]
。 [sequence=21, facet=Besondere, lex=。, str=。, reading=。, count=-1, begin=36, end=37, correlation=0.0]

... das war ein kleines Problem. URLs und Zahlen werden als "Substantive" beurteilt, daher möchte ich dies korrigieren. NLP4J verfügt auch über einen Mechanismus zur Verarbeitung der Ergebnisse der morphologischen Analyse, daher möchte ich ihn ab dem nächsten Mal unterstützen.

Zurück zum Index: [005-1] NLP4J + Twitter4J (Datenerfassung) > this> Nächste Seite

Recommended Posts

NLP4J NLP4J + Twitter4J (Analyse 1)
NLP4J Versuchen Sie eine Twitter-Analyse mit Twitter4J und NLP4J (Datenerfassung)
NLP4J Morphologische Analyse in Java (unter Verwendung von Kuromoji)