Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CanardE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MELODI
Ontology Matching
complex
CanardE
Commits
febae162
Commit
febae162
authored
2 years ago
by
Guilherme Henrique
Browse files
Options
Downloads
Patches
Plain Diff
changed args
parent
4b47ea58
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/irit/complex/ComplexAlignmentGeneration.java
+16
-24
16 additions, 24 deletions
src/main/java/irit/complex/ComplexAlignmentGeneration.java
with
16 additions
and
24 deletions
src/main/java/irit/complex/ComplexAlignmentGeneration.java
+
16
−
24
View file @
febae162
...
...
@@ -5,7 +5,6 @@ import irit.complex.answer.PairAnswer;
import
irit.complex.answer.SingleAnswer
;
import
irit.complex.subgraphs.*
;
import
irit.dataset.DatasetManager
;
import
irit.misc.Progress
;
import
irit.output.OutputManager
;
import
irit.resource.IRI
;
import
irit.resource.Resource
;
...
...
@@ -17,7 +16,6 @@ import irit.sparql.query.exception.SparqlQueryMalFormedException;
import
irit.sparql.query.select.SparqlSelect
;
import
org.apache.jena.rdf.model.RDFNode
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
...
...
@@ -34,9 +32,12 @@ public class ComplexAlignmentGeneration {
System
.
out
.
println
(
"CanardE"
);
System
.
out
.
println
(
"==============================================================================="
);
String
datasets
=
"/home/guilherme/IdeaProjects/conference-dataset-population-elodie/populated_datasets/data_100"
;
String
source
=
"cmt_100.ttl"
;
String
target
=
"conference_100.ttl"
;
String
datasets
=
args
[
0
];
String
needs
=
args
[
1
];
String
embeddings
=
args
[
2
];
String
source
=
args
[
3
];
String
target
=
args
[
4
];
String
range
=
args
[
5
];
Set
<
String
>
stringSet
=
Set
.
of
(
source
,
target
);
...
...
@@ -53,8 +54,6 @@ public class ComplexAlignmentGeneration {
System
.
out
.
println
(
"Found "
+
ds
.
size
()
+
" datasets."
);
String
needs
=
"/home/guilherme/IdeaProjects/ComplexAlignmentGenerator/needs"
;
Map
<
String
,
String
>
nd
=
new
HashMap
<>();
Map
<
String
,
List
<
SparqlSelect
>>
cqas
=
new
HashMap
<>();
...
...
@@ -85,8 +84,6 @@ public class ComplexAlignmentGeneration {
}
});
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
...
...
@@ -97,7 +94,10 @@ public class ComplexAlignmentGeneration {
System
.
out
.
println
(
"⚠️ Not found CQAs for "
+
s
+
"."
);
}
String
embeddings
=
"/home/guilherme/Documents/canard/run/glove"
;
System
.
out
.
println
(
"Needs loaded."
);
System
.
out
.
println
(
"Loading embeddings."
);
Map
<
String
,
String
[]>
embs
=
new
HashMap
<>();
try
{
Files
.
walk
(
Paths
.
get
(
embeddings
),
1
).
forEach
(
path
->
{
...
...
@@ -113,15 +113,6 @@ public class ComplexAlignmentGeneration {
throw
new
RuntimeException
(
e
);
}
String
range
=
"0:1.1:0.1"
;
String
[]
split
=
range
.
split
(
":"
);
List
<
Float
>
ths
=
new
ArrayList
<>();
for
(
float
th
=
Float
.
parseFloat
(
split
[
0
]);
th
<=
Float
.
parseFloat
(
split
[
1
]);
th
+=
Float
.
parseFloat
(
split
[
2
]))
{
ths
.
add
(
th
);
}
embs
.
forEach
((
name
,
paths
)
->
{
try
{
...
...
@@ -150,15 +141,18 @@ public class ComplexAlignmentGeneration {
});
String
[]
split
=
range
.
split
(
":"
);
List
<
Float
>
ths
=
new
ArrayList
<>();
int
tc
=
1
;
// ExecutorService executorService = Executors.newFixedThreadPool(tc);
for
(
float
th
=
Float
.
parseFloat
(
split
[
0
]);
th
<=
Float
.
parseFloat
(
split
[
1
]);
th
+=
Float
.
parseFloat
(
split
[
2
]))
{
ths
.
add
(
th
);
}
String
output
=
"output"
;
for
(
String
[]
datasetArg
:
datasetArgs
)
{
run
(
datasetArg
[
0
],
datasetArg
[
1
],
cqas
.
get
(
datasetArg
[
0
]),
ths
,
10
,
false
,
output
);
// progress.step();
}
...
...
@@ -170,8 +164,6 @@ public class ComplexAlignmentGeneration {
outputManager
.
initOutputEdoal
(
sourceEndpoint
,
targetEndpoint
,
th
,
outputPath
);
for
(
SparqlSelect
sq
:
queries
)
{
align
(
sq
,
sourceEndpoint
,
targetEndpoint
,
maxMatches
,
reassess
,
th
,
outputManager
);
}
...
...
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