mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
The 'Locale' vocabulary, which is generated by geo data, has now the
objectspace "http://dbpedia.org/resource/"
This commit is contained in:
parent
eca38c53e7
commit
79464189a4
|
@ -40,9 +40,9 @@
|
|||
<dt>Namespace</dt><dd>#[namespace]#</dd>
|
||||
<dt>Predicate</dt><dd>#[predicate]#</dd>
|
||||
<dt>Prefix</dt><dd>#[prefix]#</dd>
|
||||
<dt>Objectspace</dt><dd>#(editable)##[objectspacepredicate]#::<input type="text" name="objectspace" value="#[objectspace]#" size="78" maxlength="128" /><br/>if set, this uses the predicate <a href="#[objectspacepredicate]#">#[objectspacepredicate]#</a> for generated objects#(/editable)#</dd>
|
||||
<dt>Objectspace</dt><dd>#(editable)##[objectspace]#::<input type="text" name="objectspace" value="#[objectspace]#" size="78" maxlength="128" /><br/>if set, uses the predicate <a href="#[objectspacepredicate]#">#[objectspacepredicate]#</a> for generated objects. Hint: use 'http://dbpedia.org/resource/' as default.#(/editable)#</dd>
|
||||
</dl>
|
||||
<p>This produces the following triples in the <a href="/GetRDF.xml?global=">triplestore</a> if a term or synonym matches in a document:</p>
|
||||
<p>This produces the following triples in the <a href="/interaction/GetRDF.xml?global=">triplestore</a> if a term or synonym matches in a document:</p>
|
||||
<dl>
|
||||
<dt>Triple #1</dt><dd>#[triple1]#</dd>
|
||||
<dt>Triple #2</dt><dd>#[triple2]#</dd>
|
||||
|
|
|
@ -73,10 +73,12 @@ public class Tagging {
|
|||
}
|
||||
|
||||
private File tmpFile() {
|
||||
if (this.propFile == null) return null;
|
||||
return new File(this.propFile.getAbsolutePath() + ".tmp");
|
||||
}
|
||||
|
||||
public void put(String term, String synonyms) throws IOException {
|
||||
if (this.propFile == null) return;
|
||||
File tmp = tmpFile();
|
||||
BufferedWriter w = new BufferedWriter(new FileWriter(tmp));
|
||||
BlockingQueue<String> list = Files.concurentLineReader(this.propFile, 1000);
|
||||
|
@ -109,6 +111,7 @@ public class Tagging {
|
|||
}
|
||||
|
||||
public void delete(String term) throws IOException {
|
||||
if (this.propFile == null) return;
|
||||
File tmp = tmpFile();
|
||||
BufferedWriter w = new BufferedWriter(new FileWriter(tmp));
|
||||
BlockingQueue<String> list = Files.concurentLineReader(this.propFile, 1000);
|
||||
|
@ -136,6 +139,7 @@ public class Tagging {
|
|||
}
|
||||
|
||||
public void setObjectspace(String os) throws IOException {
|
||||
if (this.propFile == null) return;
|
||||
if (os == null || (this.objectspace != null && this.objectspace.equals(os))) return;
|
||||
this.objectspace = os;
|
||||
File tmp = tmpFile();
|
||||
|
|
|
@ -115,6 +115,10 @@ public class Autotagging {
|
|||
|
||||
public void addLocalization(Localization localization) {
|
||||
Tagging voc = new Tagging("Locale", localization);
|
||||
try {
|
||||
voc.setObjectspace("http://dbpedia.org/resource/");
|
||||
} catch (IOException e) {
|
||||
}
|
||||
this.vocabularies.put("Locale", voc);
|
||||
for (String t: voc.tags()) {
|
||||
this.allTags.put(t, PRESENT);
|
||||
|
|
Loading…
Reference in New Issue
Block a user