Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nyt-stats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shyam Upadhyay
nyt-stats
Commits
ffb5120f
Commit
ffb5120f
authored
9 years ago
by
Shyam Upadhyay
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
de213e88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/edu/illinois/cs/cogcomp/nytlabs/corpus/MainClass.java
+4
-4
4 additions, 4 deletions
...ava/edu/illinois/cs/cogcomp/nytlabs/corpus/MainClass.java
with
4 additions
and
4 deletions
src/main/java/edu/illinois/cs/cogcomp/nytlabs/corpus/MainClass.java
+
4
−
4
View file @
ffb5120f
...
@@ -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
));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment