Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
5a507f27
Commit
5a507f27
authored
10 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
added possibility of checking more than 1 file;
added list of words and their number of occurrence
parent
a9bed829
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/java/teetime/stage/WordCountingConfiguration.java
+1
-2
1 addition, 2 deletions
src/test/java/teetime/stage/WordCountingConfiguration.java
src/test/java/teetime/stage/WordCountingTest.java
+119
-1
119 additions, 1 deletion
src/test/java/teetime/stage/WordCountingTest.java
with
120 additions
and
3 deletions
src/test/java/teetime/stage/WordCountingConfiguration.java
+
1
−
2
View file @
5a507f27
...
@@ -16,7 +16,7 @@ public class WordCountingConfiguration extends AnalysisConfiguration {
...
@@ -16,7 +16,7 @@ public class WordCountingConfiguration extends AnalysisConfiguration {
private
final
CountingMapMerger
<
String
>
result
=
new
CountingMapMerger
<
String
>();
private
final
CountingMapMerger
<
String
>
result
=
new
CountingMapMerger
<
String
>();
public
WordCountingConfiguration
(
final
File
input
,
final
int
threads
)
{
public
WordCountingConfiguration
(
final
int
threads
,
final
File
...
input
)
{
final
InitialElementProducer
<
File
>
init
=
new
InitialElementProducer
<
File
>(
input
);
final
InitialElementProducer
<
File
>
init
=
new
InitialElementProducer
<
File
>(
input
);
final
File2ByteArray
f2b
=
new
File2ByteArray
();
final
File2ByteArray
f2b
=
new
File2ByteArray
();
final
ByteArray2String
b2s
=
new
ByteArray2String
();
final
ByteArray2String
b2s
=
new
ByteArray2String
();
...
@@ -43,7 +43,6 @@ public class WordCountingConfiguration extends AnalysisConfiguration {
...
@@ -43,7 +43,6 @@ public class WordCountingConfiguration extends AnalysisConfiguration {
intraFact
.
create
(
merger
.
getOutputPort
(),
result
.
getInputPort
());
intraFact
.
create
(
merger
.
getOutputPort
(),
result
.
getInputPort
());
addThreadableStage
(
init
);
addThreadableStage
(
init
);
addThreadableStage
(
merger
);
addThreadableStage
(
merger
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/teetime/stage/WordCountingTest.java
+
119
−
1
View file @
5a507f27
...
@@ -12,7 +12,8 @@ public class WordCountingTest {
...
@@ -12,7 +12,8 @@ public class WordCountingTest {
@Test
@Test
public
void
test1
()
{
public
void
test1
()
{
WordCountingConfiguration
wcc
=
new
WordCountingConfiguration
(
new
File
(
"src/test/resources/data/output.txt"
),
2
);
WordCountingConfiguration
wcc
=
new
WordCountingConfiguration
(
2
,
new
File
(
"src/test/resources/data/output.txt"
),
new
File
(
"src/test/resources/data/output.txt"
));
Analysis
analysis
=
new
Analysis
(
wcc
);
Analysis
analysis
=
new
Analysis
(
wcc
);
analysis
.
start
();
analysis
.
start
();
CountingMap
<
String
>
map
=
wcc
.
getResult
();
CountingMap
<
String
>
map
=
wcc
.
getResult
();
...
@@ -22,3 +23,120 @@ public class WordCountingTest {
...
@@ -22,3 +23,120 @@ public class WordCountingTest {
}
}
}
}
}
}
// 56 et
// 31 dolor
// 27 sed
// 27 diam
// 26 sit
// 26 lorem
// 26 ipsum
// 26 amet
// 25 dolore
// 24 ut
// 16 vero
// 16 magna
// 16 erat
// 16 ea
// 16 at
// 14 tempor
// 12 takimata
// 12 stet
// 12 sea
// 12 sanctus
// 12 sadipscing
// 12 rebum
// 12 nonumy
// 12 no
// 12 labore
// 12 kasd
// 12 justo
// 12 invidunt
// 12 gubergren
// 12 eos
// 12 elitr
// 12 eirmod
// 12 duo
// 12 dolores
// 12 consetetur
// 12 clita
// 12 aliquyam
// 12 accusam
// 11 voluptua
// 11 est
// 10 vel
// 10 in
// 9 nulla
// 9 duis
// 8 consequat
// 5 vulputate
// 5 velit
// 5 molestie
// 5 iriure
// 5 illum
// 5 hendrerit
// 5 feugiat
// 5 facilisis
// 5 eum
// 5 eu
// 5 esse
// 5 autem
// 4 zzril
// 4 wisi
// 4 volutpat
// 4 veniam
// 4 ullamcorper
// 4 tincidunt
// 4 te
// 4 tation
// 4 suscipit
// 4 quis
// 4 qui
// 4 praesent
// 4 odio
// 4 nostrud
// 4 nonummy
// 4 nisl
// 4 nibh
// 4 minim
// 4 luptatum
// 4 lobortis
// 4 laoreet
// 4 iusto
// 4 feugait
// 4 facilisi
// 4 exerci
// 4 ex
// 4 euismod
// 4 eros
// 4 enim
// 4 elit
// 4 dignissim
// 4 delenit
// 4 consectetuer
// 4 commodo
// 4 blandit
// 4 augue
// 4 aliquip
// 4 aliquam
// 4 adipiscing
// 4 ad
// 4 accumsan
// 2 soluta
// 2 quod
// 2 possim
// 2 placerat
// 2 option
// 2 nobis
// 2 nihil
// 2 nam
// 2 mazim
// 2 liber
// 2 imperdiet
// 2 id
// 2 facer
// 2 eleifend
// 2 doming
// 2 cum
// 2 congue
// 2 assum
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