Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
moex
Alignment API
Commits
7ae0fad0
Commit
7ae0fad0
authored
14 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- made the StringDistanceAlignment tolerant to the absence of label
parent
940ebd85
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fr/inrialpes/exmo/align/impl/method/StringDistAlignment.java
+8
-2
8 additions, 2 deletions
...inrialpes/exmo/align/impl/method/StringDistAlignment.java
with
8 additions
and
2 deletions
src/fr/inrialpes/exmo/align/impl/method/StringDistAlignment.java
+
8
−
2
View file @
7ae0fad0
...
@@ -54,8 +54,14 @@ public class StringDistAlignment extends DistanceAlignment implements AlignmentP
...
@@ -54,8 +54,14 @@ public class StringDistAlignment extends DistanceAlignment implements AlignmentP
similarity
=
false
;
// This is a distance matrix
similarity
=
false
;
// This is a distance matrix
}
}
public
double
measure
(
Object
o1
,
Object
o2
)
throws
Exception
{
public
double
measure
(
Object
o1
,
Object
o2
)
throws
Exception
{
String
s1
=
ontology1
().
getEntityName
(
o1
);
String
s1
=
null
;
String
s2
=
ontology2
().
getEntityName
(
o2
);
String
s2
=
null
;
try
{
s1
=
ontology1
().
getEntityName
(
o1
);
s2
=
ontology2
().
getEntityName
(
o2
);
}
catch
(
Exception
owex
)
{
// dealt with below
if
(
debug
>
1
)
owex
.
printStackTrace
();
};
// Unnamed entity = max distance
// Unnamed entity = max distance
if
(
s1
==
null
||
s2
==
null
)
return
1
.;
if
(
s1
==
null
||
s2
==
null
)
return
1
.;
Object
[]
params
=
{
s1
.
toLowerCase
(),
s2
.
toLowerCase
()
};
Object
[]
params
=
{
s1
.
toLowerCase
(),
s2
.
toLowerCase
()
};
...
...
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