Commit 4e0c5536 authored by Christian Pichot's avatar Christian Pichot
Browse files

Merge branch 'dev_cp' into 'dev_pcl'

# Conflicts:
#   AgreementMakerLight/pom.xml
parents 33ff5370 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>
......@@ -100,11 +100,15 @@
<groupId>org.gephi</groupId>
<artifactId>gephi-toolkit</artifactId>
<version>0.8.2</version>
<scope>system</scope>
<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>
</dependency>
<dependency>
<groupId>log4j</groupId>
......
......@@ -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){
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment