Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Pichot
AML-E-Project
Commits
480378e0
Commit
480378e0
authored
Mar 06, 2020
by
Christian Pichot
Browse files
Debugged code for the detection of already existing alignments in the source ontology
parent
4c2bf524
Changes
4
Hide whitespace changes
Inline
Side-by-side
AgreementMakerLight/pom.xml
View file @
480378e0
...
...
@@ -37,8 +37,8 @@
</repository>
</repositories>
<properties>
<maven.compiler.source>
1.
6
</maven.compiler.source>
<maven.compiler.target>
1.
6
</maven.compiler.target>
<maven.compiler.source>
1.
7
</maven.compiler.source>
<maven.compiler.target>
1.
7
</maven.compiler.target>
</properties>
<build>
<sourceDirectory>
${basedir}/src
</sourceDirectory>
...
...
@@ -101,14 +101,14 @@
<artifactId>
gephi-toolkit
</artifactId>
<version>
0.8.2
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/lib/gephi-toolkit.jar
</systemPath>
<systemPath>
${project.basedir}/src/lib/gephi-toolkit.jar
</systemPath>
</dependency>
<dependency>
<groupId>
edu.smu.tspell.wordnet
</groupId>
<artifactId>
jaws
</artifactId>
<version>
1.3.3
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/lib/jaws.jar
</systemPath>
<systemPath>
${project.basedir}/src/lib/jaws.jar
</systemPath>
</dependency>
<dependency>
<groupId>
log4j
</groupId>
...
...
@@ -144,4 +144,4 @@
<version>
1.6.4
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
AgreementMakerLight/src/aml/match/Alignment.java
View file @
480378e0
...
...
@@ -131,12 +131,15 @@ public class Alignment implements Collection<Mapping>
nbExistingMatch
=
0
;
//cpichotjv2020 for (int i=0; i< source.classCount();i++){
for
(
int
i
=
0
;
i
<
source
.
count
();
i
++){
//cpichotMarch2020 for (int i=0; i< source.count();i++){
for
(
int
i
=
1
;
i
<
source
.
count
()+
1
;
i
++){
Set
<
String
>
matchesTable
=
source
.
getExistingMatches
(
i
);
if
(
matchesTable
.
size
()
>
0
){
for
(
int
matchIndex
=
0
;
matchIndex
<
matchesTable
.
size
();
matchIndex
++){
//String existingMatch = matchesTable.toArray()[matchIndex].toString();
String
existingMatch
=
matchesTable
.
toArray
()[
matchIndex
].
toString
();
//check if the class (i) belongs to the present mapping
for
(
Mapping
m
:
maps
){
if
(
m
.
getSourceId
()
==
i
){
...
...
AgreementMakerLight/src/aml/ontology/ExistingMatches.java
View file @
480378e0
...
...
@@ -102,11 +102,12 @@ public class ExistingMatches
String
s
;
Provenance
p
;
int
index
=
0
;
//cpichotjv2020
/* cpichotjv2020
//Get the type of the entity
// int index = 0;//cpichotjv2020
//Get the type of the entity
EntityType
e
=
uris
.
getType
(
id
);
int
index
=
getIndex
(
e
);
/* cpichotjv2020
//If the name is not in english we parse it as a formula
if(!language.equals("en"))
...
...
@@ -122,7 +123,8 @@ public class ExistingMatches
return;
//If it is a formula, parse it and label it as such
else if(StringParser.isFormula(name))
cpichotjv2020 */
cpichotjv2020 */
if
(
StringParser
.
isFormula
(
name
))
{
s
=
StringParser
.
normalizeFormula
(
name
);
...
...
@@ -138,13 +140,14 @@ public class ExistingMatches
//Otherwise, parse it normally
else
{
s
=
StringParser
.
normalizeName
(
name
);
//cpichotjv2020 s = StringParser.normalizeName(name);
s
=
name
;
//cpichotjv2020 p = new Provenance(type, source, language, weight);
p
=
new
Provenance
(
LexicalType
.
FORMULA
,
source
,
"en"
,
1.0
);
p
=
new
Provenance
(
LexicalType
.
FORMULA
,
source
,
"en"
,
1.0
);
}
//cpichotjv2020}
//Then update the tables
entityDefinitions
[
index
].
add
(
s
,
id
,
p
);
definitionEntities
[
index
].
add
(
id
,
s
,
p
);
...
...
@@ -579,7 +582,7 @@ public class ExistingMatches
* @return the list of names associated with the entity
*/
public
Set
<
String
>
getNames
(
int
id
)
{
{
int
index
=
getIndex
(
uris
.
getType
(
id
));
if
(
definitionEntities
[
index
].
contains
(
id
))
return
definitionEntities
[
index
].
keySet
(
id
);
...
...
@@ -860,7 +863,7 @@ public class ExistingMatches
private
int
getIndex
(
EntityType
e
)
{
EntityType
[]
types
=
EntityType
.
values
();
EntityType
[]
types
=
EntityType
.
values
();
for
(
int
i
=
0
;
i
<
types
.
length
;
i
++)
if
(
types
[
i
].
equals
(
e
))
return
i
;
...
...
AgreementMakerLight/src/aml/ontology/Ontology.java
View file @
480378e0
...
...
@@ -545,7 +545,6 @@ public class Ontology
//OWLNamedIndividual ni = factory.getOWLNamedIndividual((IRI) annotation.getValue());
//existingMatch = ni.toString();
existingMatch
=
annotation
.
getValue
().
toString
();
//System.out.println(existingMatch);
}
existingMatches
.
add
(
id
,
existingMatch
,
source
);
}
//cpichotjv2020
...
...
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