Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Geisler
pe-tools-lsh
Commits
7a044396
Commit
7a044396
authored
Oct 23, 2019
by
David Geisler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete old main function
parent
7a501d38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
53 deletions
+0
-53
main.cpp
main.cpp
+0
-53
No files found.
main.cpp
deleted
100644 → 0
View file @
7a501d38
#include <iostream>
#include <Document.h>
#include <NGram.h>
#include <Word.h>
int
main
()
{
lsh
::
Word
::
Scanner
wordScanner
;
lsh
::
NGram
<
4
>::
Scanner
ngram4Scanner
;
lsh
::
NGram
<
5
>::
Scanner
ngram5Scanner
;
lsh
::
NGram
<
6
>::
Scanner
ngram6Scanner
;
std
::
vector
<
lsh
::
Document
>
doc
;
doc
.
resize
(
7
);
for
(
unsigned
int
i
=
0
;
i
<
doc
.
size
();
i
++
)
{
doc
[
i
].
add
(
&
wordScanner
);
doc
[
i
].
add
(
&
ngram4Scanner
);
doc
[
i
].
add
(
&
ngram5Scanner
);
doc
[
i
].
add
(
&
ngram6Scanner
);
}
doc
[
0
].
add
(
"My house is my castle!"
);
doc
[
1
].
add
(
"My house is my castle and living space!"
);
doc
[
2
].
add
(
"My castle is my house!"
);
doc
[
3
].
add
(
"This sentence has nothing to do with the three above! But the castle appears!"
);
doc
[
4
].
add
(
"Program is written in c++"
);
doc
[
5
].
add
(
"My program is written in c++"
);
doc
[
6
].
add
(
"I prefer to write my programs in c++"
);
printf
(
" |"
);
for
(
unsigned
int
j
=
0
;
j
<
doc
.
size
();
j
++
)
{
printf
(
" Doc %02d |"
,
j
);
}
printf
(
"
\n
"
);
for
(
unsigned
int
j
=
0
;
j
<
doc
.
size
()
+
1
;
j
++
)
{
printf
(
"--------+"
);
}
printf
(
"
\n
"
);
for
(
unsigned
int
i
=
0
;
i
<
doc
.
size
();
i
++
)
{
printf
(
" Doc %02d | "
,
i
);
for
(
unsigned
int
j
=
0
;
j
<
doc
.
size
();
j
++
)
{
printf
(
"%0.4f | "
,
doc
[
i
].
similarity
(
doc
[
j
],
1000
,
i
*
doc
.
size
()
+
j
));
fflush
(
stdout
);
}
printf
(
"
\n
"
);
for
(
unsigned
int
j
=
0
;
j
<
doc
.
size
()
+
1
;
j
++
)
{
printf
(
"--------+"
);
}
printf
(
"
\n
"
);
}
return
0
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment