-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Long Pham
committed
May 24, 2018
1 parent
fffe91c
commit 770a7e6
Showing
10 changed files
with
321 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.class | ||
*.jar | ||
*.ser | ||
lib/chromedriver |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
33 changes: 33 additions & 0 deletions
33
src/main/java/org/forward/entitysearch/experiment/TestReadObject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.forward.entitysearch.experiment; | ||
|
||
import edu.stanford.nlp.ling.CoreAnnotations; | ||
import edu.stanford.nlp.ling.CoreLabel; | ||
import edu.stanford.nlp.ling.CustomizableCoreAnnotations; | ||
import org.forward.entitysearch.ingestion.ESAnnotatedHTMLDocument; | ||
|
||
import java.io.FileInputStream; | ||
import java.io.ObjectInputStream; | ||
|
||
public class TestReadObject { | ||
public static void main (String[] args) { | ||
ESAnnotatedHTMLDocument doc = null; | ||
FileInputStream fin = null; | ||
ObjectInputStream ois = null; | ||
try { | ||
fin = new FileInputStream("serialized/kevin.ser"); | ||
ois = new ObjectInputStream(fin); | ||
doc = (ESAnnotatedHTMLDocument) ois.readObject(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
if (doc != null) { | ||
System.out.println(doc.get(CoreAnnotations.TokensAnnotation.class).size()); | ||
for (CoreLabel token : doc.get(CoreAnnotations.TokensAnnotation.class)) { | ||
System.out.println(token.word() + " " + token.ner() + " " + | ||
token.get(CustomizableCoreAnnotations.LayoutHeightAnnotation.class) + " " + | ||
token.get(CustomizableCoreAnnotations.LayoutWidthAnnotation.class)); | ||
} | ||
System.out.println(doc.getHeight() + " " + doc.getWidth()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tysearch/experiment/AnnotatorFactory.java → ...arch/ner/annotation/AnnotatorFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0 http://www.forwarddatalab.org/kevinchang | ||
1 http://www.forwarddatalab.org/research |