-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3822 - Order of matches found in knowledge base search is not correct
- Properly additional match labels in the SPARQLQueryBuilder - Use the additional match labels when ranking using the LevenshteinFeatureGenerator
- Loading branch information
Showing
11 changed files
with
144 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ption/inception-kb/src/test/resources/queries/additional_search_properties_2/rdf4j.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PREFIX search: <http://www.openrdf.org/contrib/lucenesail#> | ||
SELECT DISTINCT ?m ?l ?subj | ||
WHERE { { { { ?pMatch <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> * <http://www.w3.org/2000/01/rdf-schema#prefLabel> . } UNION { ?pMatch <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> * <http://www.w3.org/2000/01/rdf-schema#label> . } | ||
{ ?subj search:matches [ search:query "hand" ; | ||
search:property ?pMatch ; | ||
search:snippet ?snippet ] . | ||
BIND( REPLACE( REPLACE( ?snippet, "</B>", "" ), "<B>", "" ) AS ?label ) | ||
?subj ?pMatch ?m . | ||
FILTER ( ( STR( ?label ) = STR( ?m ) && ( LANGMATCHES( LANG( ?m ), "en" ) || LANG( ?m ) = "" ) ) ) } } } | ||
OPTIONAL { ?pPrefLabel <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> * <http://www.w3.org/2000/01/rdf-schema#prefLabel> . } | ||
OPTIONAL { { ?subj ?pPrefLabel ?l . | ||
FILTER ( ( LANGMATCHES( LANG( ?l ), "en" ) || LANG( ?l ) = "" ) ) } } } | ||
LIMIT 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
rdfs:prefLabel 'specimen' ; | ||
rdfs:label 'sample' ; | ||
rdfs:label 'instance' ; | ||
rdfs:label 'case' . | ||
rdfs:label 'case' . |
4 changes: 4 additions & 0 deletions
4
inception/inception-kb/src/test/resources/turtle/data_additional_search_properties_2.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<#example> | ||
rdfs:prefLabel 'Hand structure (body structure)' ; | ||
rdfs:label 'Hand' ; | ||
rdfs:label 'Hand structure' . |