Skip to content

Commit

Permalink
Added open-korean-text
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Hohyon Ryu committed Feb 1, 2017
1 parent ecbda97 commit bade4d7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
<type>pom</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.openkoreantext</groupId>
<artifactId>open-korean-text-processor</artifactId>
<version>1.0</version>
</dependency>
</dependencies>

<build>
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/org/openkoreantext/MyResource.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package org.openkoreantext;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.openkoreantext.processor.KoreanTokenJava;
import org.openkoreantext.processor.OpenKoreanTextProcessorJava;

/**
* Root resource (exposed at "myresource" path)
*/
Expand All @@ -20,6 +25,9 @@ public class MyResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String getIt() {
return "Hello, Heroku!";
List<KoreanTokenJava> parsed =
OpenKoreanTextProcessorJava.tokensToJavaKoreanTokenList(
OpenKoreanTextProcessorJava.tokenize("오픈코리안텍스트 한국어 분석기 API입니다"));
return parsed.toString();
}
}

0 comments on commit bade4d7

Please sign in to comment.