Skip to content
Snippets Groups Projects
Commit b7e9329d authored by David Rouquet's avatar David Rouquet
Browse files

Merge branch '10-unl2rdf-problemes-de-labels' into 'master'

Set language of all label null

Closes #10

See merge request !8
parents d14b5ec3 ed473684
Branches main
No related tags found
1 merge request!8Set language of all label null
...@@ -19,6 +19,7 @@ import static fr.tetras_libre.unltools.rdf.vocabulary.Slugify.slugify; ...@@ -19,6 +19,7 @@ import static fr.tetras_libre.unltools.rdf.vocabulary.Slugify.slugify;
public class UnlDocumentToRdfConverter { public class UnlDocumentToRdfConverter {
private final static String DOMAIN = "http://rdf-unl.org"; private final static String DOMAIN = "http://rdf-unl.org";
private final static String Lang = null;
private RelationLabelToUnlPropertyConverter relationLabelToUnlPropertyConverter; private RelationLabelToUnlPropertyConverter relationLabelToUnlPropertyConverter;
...@@ -78,12 +79,12 @@ public class UnlDocumentToRdfConverter { ...@@ -78,12 +79,12 @@ public class UnlDocumentToRdfConverter {
// Création de l'universalWord dans le dictionnaire // Création de l'universalWord dans le dictionnaire
var universalWordIndividual = sentenceOntModel.createIndividual(String.format("%s/%s#%s", DOMAIN, uniqId, slugify(uw.getUniversalWord().toString())), UNL.UW_Lexeme); var universalWordIndividual = sentenceOntModel.createIndividual(String.format("%s/%s#%s", DOMAIN, uniqId, slugify(uw.getUniversalWord().toString())), UNL.UW_Lexeme);
universalWordIndividual.addLabel(uw.getUniversalWord().toString(), "fr/tetras_libre/unltools/unl"); universalWordIndividual.addLabel(uw.getUniversalWord().toString(), UnlDocumentToRdfConverter.Lang);
// Création de l'occurence du l'universalWord // Création de l'occurence du l'universalWord
var universalWordOccurrence = sentenceOntModel.createIndividual(UtilGraphNodeUri.constructGraphNodeUri(sentenceNameSpace, uw), var universalWordOccurrence = sentenceOntModel.createIndividual(UtilGraphNodeUri.constructGraphNodeUri(sentenceNameSpace, uw),
UNL.UW_Occurrence); UNL.UW_Occurrence);
universalWordOccurrence.addLabel(uw.getUniversalWord().toString(), "fr/tetras_libre/unltools/unl"); universalWordOccurrence.addLabel(uw.getUniversalWord().toString(), UnlDocumentToRdfConverter.Lang);
this.setSuperstructureWithSubstructure(sentenceOntModel, sentenceIndividual, sentenceOntModel, universalWordOccurrence); this.setSuperstructureWithSubstructure(sentenceOntModel, sentenceIndividual, sentenceOntModel, universalWordOccurrence);
sentenceOntModel.add(universalWordOccurrence, UNL.is_occurrence_of, universalWordIndividual); sentenceOntModel.add(universalWordOccurrence, UNL.is_occurrence_of, universalWordIndividual);
sentenceOntModel.add(universalWordIndividual, UNL.has_occurrence, universalWordOccurrence); sentenceOntModel.add(universalWordIndividual, UNL.has_occurrence, universalWordOccurrence);
...@@ -103,7 +104,7 @@ public class UnlDocumentToRdfConverter { ...@@ -103,7 +104,7 @@ public class UnlDocumentToRdfConverter {
UtilGraphNodeUri.constructGraphNodeUri(sentenceNameSpace, graphRefNode), UtilGraphNodeUri.constructGraphNodeUri(sentenceNameSpace, graphRefNode),
UNL.UNL_Scope); UNL.UNL_Scope);
scopeIndividual.addLabel(scopeName, "fr/tetras_libre/unltools/unl"); scopeIndividual.addLabel(scopeName, UnlDocumentToRdfConverter.Lang);
this.setSuperstructureWithSubstructure(sentenceOntModel, sentenceIndividual, sentenceOntModel, scopeIndividual); this.setSuperstructureWithSubstructure(sentenceOntModel, sentenceIndividual, sentenceOntModel, scopeIndividual);
GraphExtensions.getRelationWithinScopeStream(graphRefNode.getReferenceNumber(), sentencegraph) GraphExtensions.getRelationWithinScopeStream(graphRefNode.getReferenceNumber(), sentencegraph)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment