Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- added size of vocabulary to vocabulary view - fixed bad terms in vocabulary-from-titles autogeneration

Michael Peter Christen743b0ec89fa5
diff --git a/htroot/Vocabulary_p.html b/htroot/Vocabulary_p.html
index c073b9abf..0e980fd7f 100644
--- a/htroot/Vocabulary_p.html
+++ b/htroot/Vocabulary_p.html
@@ -107,6 +107,7 @@ function updatepage(str) {
<dl>
<dt>Vocabulary Name</dt><dd>#[name]#</dd>
<dt>File</dt><dd>#(editable)#[automatically generated, not stored, cannot be edited]::#[file]##(/editable)#</dd>
+ <dt>Size</dt><dd>#[size]#</dd>
<dt>Namespace</dt><dd>#[namespace]#</dd>
<dt>Predicate</dt><dd>#[predicate]#</dd>
<dt>Prefix</dt><dd>#[prefix]#</dd>
diff --git a/htroot/Vocabulary_p.java b/htroot/Vocabulary_p.java
index b1899c254..87080a1a4 100644
--- a/htroot/Vocabulary_p.java
+++ b/htroot/Vocabulary_p.java
@@ -90,6 +90,7 @@ public class Vocabulary_p {
if (discoverFromTitle || discoverFromTitleSplitted) {
URIMetadataRow m = segment.urlMetadata().load(u.hash());
if (m != null) t = m.dc_title();
+ if (t.endsWith(".jpg") || t.endsWith(".gif")) continue;
}
if (discoverFromAuthor) {
URIMetadataRow m = segment.urlMetadata().load(u.hash());
@@ -101,6 +102,7 @@ public class Vocabulary_p {
String[] ts = t.split(" ");
for (String s: ts) {
if (s.length() == 0) continue;
+ if (s.endsWith(".jpg") || s.endsWith(".gif")) continue;
table.put(s, new Tagging.SOTuple("", u0));
}
} else if (discoverFromAuthor) {
@@ -189,6 +191,7 @@ public class Vocabulary_p {
prop.putHTML("edit_editable_file", editable ? vocabulary.getFile().getAbsolutePath() : "");
prop.putHTML("edit_name", vocabulary.getName());
prop.putHTML("edit_namespace", vocabulary.getNamespace());
+ prop.put("edit_size", vocabulary.size());
prop.putHTML("edit_predicate", vocabulary.getPredicate());
prop.putHTML("edit_prefix", Tagging.DEFAULT_PREFIX);
prop.putHTML("edit_editable_objectspace", vocabulary.getObjectspace() == null ? "" : vocabulary.getObjectspace());
diff --git a/source/net/yacy/cora/lod/vocabulary/Tagging.java b/source/net/yacy/cora/lod/vocabulary/Tagging.java
index 1e0331d74..57604d0aa 100644
--- a/source/net/yacy/cora/lod/vocabulary/Tagging.java
+++ b/source/net/yacy/cora/lod/vocabulary/Tagging.java
@@ -169,9 +169,8 @@ public class Tagging {
}
-
- public void updateTerm(String term, String[] synonyms) {
-
+ public int size() {
+ return this.term2objectlink.size();
}
private File tmpFile() {