You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2011/09/23 11:35:53 UTC

svn commit: r1174617 - /incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java

Author: joern
Date: Fri Sep 23 09:35:52 2011
New Revision: 1174617

URL: http://svn.apache.org/viewvc?rev=1174617&view=rev
Log:
OPENNLP-235 Extended the Span object to add a confidence score.

Added:
    incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java   (with props)

Added: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java?rev=1174617&view=auto
==============================================================================
--- incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java (added)
+++ incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java Fri Sep 23 09:35:52 2011
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.opennlp.caseditor.namefinder;
+
+import opennlp.tools.util.Span;
+
+// Note: Should be replaced with OpenNLP Tools Span when
+// it has a confidence score ...
+public class ConfidenceSpan extends Span {
+
+  private final double confidence;
+  
+  public ConfidenceSpan(int s, int e, double confidence) {
+    super(s, e);
+    this.confidence = confidence;
+  }
+  
+  double getConfidence() {
+    return confidence;
+  }
+}

Propchange: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/ConfidenceSpan.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain