Skip to content
Snippets Groups Projects
Commit ffb5120f authored by Shyam Upadhyay's avatar Shyam Upadhyay
Browse files

wip

parent de213e88
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ import java.util.List; ...@@ -24,7 +24,7 @@ import java.util.List;
public class MainClass { public class MainClass {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
ExtractAbstracts(); ExtractAbstracts(Integer.parseInt(args[0]), Integer.parseInt(args[1]));
System.exit(-1); System.exit(-1);
} }
...@@ -81,7 +81,7 @@ public class MainClass { ...@@ -81,7 +81,7 @@ public class MainClass {
// static FrameNetManager fm = new FrameNetManager("framenet_1.5"); // static FrameNetManager fm = new FrameNetManager("framenet_1.5");
public static void ExtractAbstracts() throws Exception { public static void ExtractAbstracts(final int limit, int thres) throws Exception {
final NYTCorpusDocumentParser pp = new NYTCorpusDocumentParser(); final NYTCorpusDocumentParser pp = new NYTCorpusDocumentParser();
final int[] cnt = {0}; final int[] cnt = {0};
Path startPath = Paths.get(Params.path); Path startPath = Paths.get(Params.path);
...@@ -99,7 +99,7 @@ public class MainClass { ...@@ -99,7 +99,7 @@ public class MainClass {
if (cnt[0] % 100 == 0) { if (cnt[0] % 100 == 0) {
System.out.println(cnt[0]); System.out.println(cnt[0]);
} }
if (cnt[0] == 5000) { if (cnt[0] == limit) {
System.out.println("Done!"); System.out.println("Done!");
return FileVisitResult.TERMINATE; return FileVisitResult.TERMINATE;
} }
...@@ -111,7 +111,7 @@ public class MainClass { ...@@ -111,7 +111,7 @@ public class MainClass {
System.out.println(desc.getTotal()); System.out.println(desc.getTotal());
for(String str:desc.getSortedItemsHighestFirst()) for(String str:desc.getSortedItemsHighestFirst())
{ {
if(desc.getCount(str)>100) if(desc.getCount(str)>thres)
System.out.println(str+" "+desc.getCount(str)); System.out.println(str+" "+desc.getCount(str));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment