We are planning to release "a library that allows you to easily try natural language processing" in the near future.
If you write a code like this
public static void main(String[] args) throws IOException {
String text = "I ran to school today.";
YJpMaService service = new YJpMaService();
ArrayList<Keyword> kwds = service.getKeywords(text);
for (Keyword kwd : kwds) {
System.out.println(kwd);
}
}
It is output like this.
Keyword [facet=noun, lex=today, str=today, reading=Today]
Keyword [facet=Particle, lex=Is, str=Is, reading=Is]
Keyword [facet=verb, lex=Run, str=Run, reading=Hashi]
Keyword [facet=Particle, lex=hand, str=hand, reading=hand]
Keyword [facet=noun, lex=school, str=school, reading=Gakkou]
Keyword [facet=Particle, lex=To, str=To, reading=To]
Keyword [facet=verb, lex=go, str=To go, reading=breath]
Keyword [facet=Auxiliary verb, lex=Masu, str=Better, reading=Better]
Keyword [facet=Auxiliary verb, lex=Ta, str=Ta, reading=Ta]
Keyword [facet=Special, lex=。, str=。, reading=。]
In this example, the Japanese morphological analysis service of Yahoo! Japan is called behind the scenes. → https://developer.yahoo.co.jp/webapi/jlp/ma/v1/parse.html We are planning to call other natural language processing services in a unified way and provide a mechanism to create our own natural language processing.
Natural language processing is quite fun, but when I try to do it with programming (Java!), Calling a process or processing a response can be quite troublesome.
So, personally, when I made an open source version of the mechanism that I have used for many years, the threshold for natural language processing went down, for example, university students tried using it for a little study, or used it as a starting point in a university laboratory. I'm thinking that it will be something that can be seen.
I'm preparing the code as a do-it-yourselfer.
that's all.
Recommended Posts