Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Absinth - A Small World of Semantic Similarity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
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
Victor Zimmermann
Absinth - A Small World of Semantic Similarity
Commits
a53bc668
Commit
a53bc668
authored
7 years ago
by
Victor Zimmermann
Browse files
Options
Downloads
Patches
Plain Diff
Reimplement classic (bad) baselines.
parent
32c9f1bb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/all-in-one.py
+27
-0
27 additions, 0 deletions
src/all-in-one.py
src/singletons.py
+27
-0
27 additions, 0 deletions
src/singletons.py
with
54 additions
and
0 deletions
baseline
/all-in-one.py
→
src
/all-in-one.py
+
27
−
0
View file @
a53bc668
results
=
open
(
'
all-in-one.tsv
'
,
'
w
'
)
#!/usr/bin/env python3
with
open
(
'
results.txt
'
,
'
r
'
)
as
f
:
# -*- coding: utf-8 -*-
import
config
import
time
import
sys
time_int
=
int
(
time
.
strftime
(
"
%Y%m%d%H%M%S
"
)[
2
:])
final_path
=
'
final/{}.absinth
'
.
format
(
hex
(
time_int
)[
2
:])
results
=
open
(
final_path
,
'
w
'
)
if
'
-t
'
in
sys
.
argv
:
data_path
=
config
.
test
else
:
data_path
=
config
.
dataset
with
open
(
data_path
+
'
results.txt
'
,
'
r
'
)
as
f
:
results
.
write
(
'
subTopicID
\t
resultID
\n
'
)
results
.
write
(
'
subTopicID
\t
resultID
\n
'
)
lines
=
f
.
readlines
()
lines
=
f
.
readlines
()
for
line
in
lines
[
1
:]:
for
line
in
lines
[
1
:]:
result_id
=
line
.
split
()[
0
]
result_id
=
line
.
split
()[
0
]
results
.
write
(
result_id
.
split
(
'
.
'
)[
0
]
+
'
.1
\t
'
+
result_id
+
'
\n
'
)
results
.
write
(
result_id
.
split
(
'
.
'
)[
0
]
+
'
.1
\t
'
+
result_id
+
'
\n
'
)
results
.
close
()
This diff is collapsed.
Click to expand it.
baseline
/singletons.py
→
src
/singletons.py
+
27
−
0
View file @
a53bc668
results
=
open
(
'
singletons.tsv
'
,
'
w
'
)
#!/usr/bin/env python3
with
open
(
'
results.txt
'
,
'
r
'
)
as
f
:
# -*- coding: utf-8 -*-
import
config
import
time
import
sys
time_int
=
int
(
time
.
strftime
(
"
%Y%m%d%H%M%S
"
)[
2
:])
final_path
=
'
final/{}.absinth
'
.
format
(
hex
(
time_int
)[
2
:])
results
=
open
(
final_path
,
'
w
'
)
if
'
-t
'
in
sys
.
argv
:
data_path
=
config
.
test
else
:
data_path
=
config
.
dataset
with
open
(
data_path
+
'
results.txt
'
,
'
r
'
)
as
f
:
results
.
write
(
'
subTopicID
\t
resultID
\n
'
)
results
.
write
(
'
subTopicID
\t
resultID
\n
'
)
lines
=
f
.
readlines
()
lines
=
f
.
readlines
()
for
line
in
lines
[
1
:]:
for
line
in
lines
[
1
:]:
result_id
=
line
.
split
()[
0
]
result_id
=
line
.
split
()[
0
]
results
.
write
(
result_id
+
'
\t
'
+
result_id
+
'
\n
'
)
results
.
write
(
result_id
+
'
\t
'
+
result_id
+
'
\n
'
)
results
.
close
()
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