This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

normalized file endings

and added * text=auto to .gitattributes
--> no more CRLF trouble (?)
  • Loading branch information...
maxjakob committed May 31, 2013
1 parent 07538d2 commit d05d94000a670b66eb7b8aa6c128066a3263f606
Showing with 6,124 additions and 6,122 deletions.
  1. +2 −0 .gitattributes
  2. +39 −39 core/src/main/java/org/dbpedia/spotlight/annotate/Annotator.java
  3. +102 −102 core/src/main/java/org/dbpedia/spotlight/disambiguate/Disambiguator.java
  4. +37 −37 core/src/main/java/org/dbpedia/spotlight/exceptions/AnnotationException.java
  5. +37 −37 core/src/main/java/org/dbpedia/spotlight/exceptions/AuthenticationException.java
  6. +32 −32 core/src/main/java/org/dbpedia/spotlight/exceptions/ConfigurationException.java
  7. +36 −36 core/src/main/java/org/dbpedia/spotlight/exceptions/IndexException.java
  8. +37 −37 core/src/main/java/org/dbpedia/spotlight/exceptions/InputException.java
  9. +35 −35 core/src/main/java/org/dbpedia/spotlight/exceptions/ItemNotFoundException.java
  10. +37 −37 core/src/main/java/org/dbpedia/spotlight/exceptions/OutputException.java
  11. +37 −37 core/src/main/java/org/dbpedia/spotlight/exceptions/SearchException.java
  12. +38 −38 core/src/main/java/org/dbpedia/spotlight/exceptions/SparqlExecutionException.java
  13. +34 −34 core/src/main/java/org/dbpedia/spotlight/exceptions/TimeoutException.java
  14. +198 −198 core/src/main/java/org/dbpedia/spotlight/io/DataLoader.java
  15. +55 −55 core/src/main/java/org/dbpedia/spotlight/lucene/LuceneFeatureVector.java
  16. +85 −85 core/src/main/java/org/dbpedia/spotlight/lucene/analysis/PhoneticAnalyzer.java
  17. +103 −103 core/src/main/java/org/dbpedia/spotlight/lucene/disambiguate/MixedWeightsDisambiguator.java
  18. +140 −140 core/src/main/java/org/dbpedia/spotlight/lucene/search/LuceneCandidateSearcher.java
  19. +119 −119 core/src/main/java/org/dbpedia/spotlight/lucene/search/SeparateOccurrencesContextSearcher.java
  20. +198 −198 core/src/main/java/org/dbpedia/spotlight/lucene/similarity/CachedInvCandFreqSimilarity.java
  21. +114 −114 core/src/main/java/org/dbpedia/spotlight/lucene/similarity/InvCandFreqSimilarity.java
  22. +139 −139 core/src/main/java/org/dbpedia/spotlight/lucene/similarity/JCSTermCache.java
  23. +144 −144 core/src/main/java/org/dbpedia/spotlight/lucene/similarity/NewSimilarity.java
  24. +181 −181 core/src/main/java/org/dbpedia/spotlight/lucene/similarity/TermCache.java
  25. +132 −132 core/src/main/java/org/dbpedia/spotlight/lucene/similarity/TermsFilter.java
  26. +50 −50 core/src/main/java/org/dbpedia/spotlight/model/CandidateSearcher.java
  27. +36 −36 core/src/main/java/org/dbpedia/spotlight/model/ContextSearcher.java
  28. +27 −27 core/src/main/java/org/dbpedia/spotlight/spot/JAnnotationTokenizerFactory.java
  29. +129 −129 core/src/main/java/org/dbpedia/spotlight/spot/KeaSpotter.java
  30. +217 −217 core/src/main/java/org/dbpedia/spotlight/spot/NESpotter.java
  31. +82 −82 core/src/main/java/org/dbpedia/spotlight/spot/NGram.java
  32. +239 −239 core/src/main/java/org/dbpedia/spotlight/string/WikiLinkParser.java
  33. +67 −67 core/src/main/java/org/dbpedia/spotlight/util/MemUtil.java
  34. +95 −95 core/src/main/java/org/dbpedia/spotlight/util/NewLogForEachRunFileAppender.java
  35. +139 −139 core/src/main/java/org/dbpedia/spotlight/util/RankingStrategy.java
  36. +125 −125 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/BloomFilterCalculations.java
  37. +31 −31 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/Factory.java
  38. +51 −51 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/ICompactSerializer.java
  39. +171 −171 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/LongBitSet.java
  40. +49 −49 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/LongBitSetSerializer.java
  41. +124 −124 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/LongFastBloomFilter.java
  42. +71 −71 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/MurmurHash.java
  43. +89 −89 core/src/main/java/org/dbpedia/spotlight/util/bloomfilter/ReusuableObjectPool.java
  44. +66 −66 core/src/main/resources/log4j.properties
  45. +155 −155 core/src/main/scala/org/dbpedia/spotlight/disambiguate/MultiThreadedDisambiguatorWrapper.scala
  46. +25 −25 core/src/main/scala/org/dbpedia/spotlight/disambiguate/mixtures/Fader2Mixture.scala
  47. +34 −34 core/src/main/scala/org/dbpedia/spotlight/disambiguate/mixtures/FaderMixture.scala
  48. +64 −64 core/src/main/scala/org/dbpedia/spotlight/disambiguate/mixtures/LinearRegressionMixture.scala
  49. +18 −18 core/src/main/scala/org/dbpedia/spotlight/disambiguate/mixtures/Mixture.scala
  50. +16 −16 core/src/main/scala/org/dbpedia/spotlight/disambiguate/mixtures/OnlySimScoreMixture.scala
  51. +70 −70 core/src/main/scala/org/dbpedia/spotlight/filter/Filter.scala
  52. +54 −54 core/src/main/scala/org/dbpedia/spotlight/filter/annotations/ConfidenceFilter.scala
  53. +24 −24 core/src/main/scala/org/dbpedia/spotlight/io/DisambiguationSource.scala
  54. +23 −23 core/src/main/scala/org/dbpedia/spotlight/io/FeedbackStore.scala
  55. +169 −169 core/src/main/scala/org/dbpedia/spotlight/io/FileOccurrenceSource.scala
  56. +24 −24 core/src/main/scala/org/dbpedia/spotlight/io/OccurrenceSource.scala
  57. +24 −24 core/src/main/scala/org/dbpedia/spotlight/io/WikiPageSource.scala
  58. +50 −50 core/src/main/scala/org/dbpedia/spotlight/model/AnnotatedParagraph.scala
  59. +69 −69 core/src/main/scala/org/dbpedia/spotlight/model/Paragraph.scala
  60. +34 −34 core/src/main/scala/org/dbpedia/spotlight/model/Provenance.scala
  61. +33 −33 core/src/main/scala/org/dbpedia/spotlight/model/WikiPageContext.scala
  62. +70 −70 core/src/main/scala/org/dbpedia/spotlight/spot/SpotXmlParser.scala
  63. +32 −32 core/src/main/scala/org/dbpedia/spotlight/spot/lingpipe/AnnotationTokenizerFactory.scala
  64. +36 −36 core/src/main/scala/org/dbpedia/spotlight/spot/lingpipe/TokenizerRegEx.scala
  65. +108 −108 core/src/main/scala/org/dbpedia/spotlight/string/ContextExtractor.scala
  66. +193 −193 core/src/main/scala/org/dbpedia/spotlight/string/WikiMarkupStripper.scala
  67. +297 −297 core/src/main/scala/org/dbpedia/spotlight/util/AnnotationFilter.scala
  68. +265 −265 core/src/main/scala/org/dbpedia/spotlight/util/CreateLexicalizations.scala
  69. +74 −74 core/src/main/scala/org/dbpedia/spotlight/util/Profiling.scala
  70. +23 −23 core/src/main/scala/org/dbpedia/spotlight/vsm/FeatureVector.scala
  71. +23 −23 core/src/main/scala/org/dbpedia/spotlight/vsm/FeatureVectorBuilder.scala
  72. +100 −100 dist/src/deb/control/data/usr/share/dbpedia-spotlight/index/similarity-thresholds.txt
  73. +48 −48 licenses/lingpipe-license-1.txt
@@ -2,6 +2,8 @@
# when committed they are stored with LF,
# on checkout they are converted to the OS's native line endings
# https://help.github.com/articles/dealing-with-line-endings
* text=auto
*.java text
*.scala text
*.xml text
@@ -1,39 +1,39 @@
/**
* Copyright 2011 Pablo Mendes, Max Jakob
*
* Licensed 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.dbpedia.spotlight.annotate;
import org.dbpedia.spotlight.disambiguate.Disambiguator;
import org.dbpedia.spotlight.exceptions.InputException;
import org.dbpedia.spotlight.exceptions.SearchException;
import org.dbpedia.spotlight.spot.Spotter;
import org.dbpedia.spotlight.model.DBpediaResourceOccurrence;
import java.util.List;
/**
* Interface for annotators.
*/
public interface Annotator {
public List<DBpediaResourceOccurrence> annotate(String text) throws SearchException, InputException;
public Disambiguator disambiguator();
public Spotter spotter();
}
/**
* Copyright 2011 Pablo Mendes, Max Jakob
*
* Licensed 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.dbpedia.spotlight.annotate;
import org.dbpedia.spotlight.disambiguate.Disambiguator;
import org.dbpedia.spotlight.exceptions.InputException;
import org.dbpedia.spotlight.exceptions.SearchException;
import org.dbpedia.spotlight.spot.Spotter;
import org.dbpedia.spotlight.model.DBpediaResourceOccurrence;
import java.util.List;
/**
* Interface for annotators.
*/
public interface Annotator {
public List<DBpediaResourceOccurrence> annotate(String text) throws SearchException, InputException;
public Disambiguator disambiguator();
public Spotter spotter();
}
@@ -1,103 +1,103 @@
/**
* Copyright 2011 Pablo Mendes, Max Jakob
*
* Licensed 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.dbpedia.spotlight.disambiguate;
import org.apache.lucene.search.Explanation;
import org.dbpedia.spotlight.exceptions.InputException;
import org.dbpedia.spotlight.exceptions.ItemNotFoundException;
import org.dbpedia.spotlight.exceptions.SearchException;
import org.dbpedia.spotlight.model.*;
import java.io.IOException;
import java.util.List;
/**
* Interface for occurrence-based disambiguators.
* TODO consider renaming to OccurrenceDisambiguator
* @author pablomendes
* @author maxjakob
*/
public interface Disambiguator {
public List<SurfaceFormOccurrence> spotProbability(List<SurfaceFormOccurrence> sfOccurrences) throws SearchException;
/**
* Executes disambiguation per individual occurrence.
* Can be seen as a classification task: unlabeled instance in, labeled instance out.
*
* @param sfOccurrence
* @return
* @throws SearchException
* @throws ItemNotFoundException
* @throws InputException
*/
public DBpediaResourceOccurrence disambiguate(SurfaceFormOccurrence sfOccurrence) throws SearchException, ItemNotFoundException, InputException; //TODO DisambiguationException
/**
* Executes disambiguation per paragraph (collection of occurrences).
* Can be seen as a classification task: unlabeled instances in, labeled instances out.
*
* @param sfOccurrences
* @return
* @throws SearchException
* @throws InputException
*/
public List<DBpediaResourceOccurrence> disambiguate(List<SurfaceFormOccurrence> sfOccurrences) throws SearchException, InputException; //TODO DisambiguationException
/**
* Executes disambiguation per occurrence, returns a list of possible candidates.
* Can be seen as a ranking (rather than classification) task: query instance in, ranked list of target URIs out.
*
* @param sfOccurrence
* @param k
* @return
* @throws SearchException
* @throws ItemNotFoundException
* @throws InputException
*/
//TODO consider moving this to CandidateSelector / CandidateSearcher interface
public List<DBpediaResourceOccurrence> bestK(SurfaceFormOccurrence sfOccurrence, int k) throws SearchException, ItemNotFoundException, InputException;
/**
* Every disambiguator has a name that describes its settings (used in evaluation to compare results)
* @return a short description of the Disambiguator
*/
public String name();
/**
* Every disambiguator should know how to measure the ambiguity of a surface form.
* @param sf
* @return ambiguity of surface form (number of candidates)
*/
public int ambiguity(SurfaceForm sf) throws SearchException;
/**
* Counts how many occurrences we indexed for a given URI. (size of training set for that URI)
* @param resource
* @return
* @throws SearchException
*/
public int support(DBpediaResource resource) throws SearchException;
public List<Explanation> explain(DBpediaResourceOccurrence goldStandardOccurrence, int nExplanations) throws SearchException;
public int contextTermsNumber(DBpediaResource resource) throws SearchException;
public double averageIdf(Text context) throws IOException;
/**
* Copyright 2011 Pablo Mendes, Max Jakob
*
* Licensed 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.dbpedia.spotlight.disambiguate;
import org.apache.lucene.search.Explanation;
import org.dbpedia.spotlight.exceptions.InputException;
import org.dbpedia.spotlight.exceptions.ItemNotFoundException;
import org.dbpedia.spotlight.exceptions.SearchException;
import org.dbpedia.spotlight.model.*;
import java.io.IOException;
import java.util.List;
/**
* Interface for occurrence-based disambiguators.
* TODO consider renaming to OccurrenceDisambiguator
* @author pablomendes
* @author maxjakob
*/
public interface Disambiguator {
public List<SurfaceFormOccurrence> spotProbability(List<SurfaceFormOccurrence> sfOccurrences) throws SearchException;
/**
* Executes disambiguation per individual occurrence.
* Can be seen as a classification task: unlabeled instance in, labeled instance out.
*
* @param sfOccurrence
* @return
* @throws SearchException
* @throws ItemNotFoundException
* @throws InputException
*/
public DBpediaResourceOccurrence disambiguate(SurfaceFormOccurrence sfOccurrence) throws SearchException, ItemNotFoundException, InputException; //TODO DisambiguationException
/**
* Executes disambiguation per paragraph (collection of occurrences).
* Can be seen as a classification task: unlabeled instances in, labeled instances out.
*
* @param sfOccurrences
* @return
* @throws SearchException
* @throws InputException
*/
public List<DBpediaResourceOccurrence> disambiguate(List<SurfaceFormOccurrence> sfOccurrences) throws SearchException, InputException; //TODO DisambiguationException
/**
* Executes disambiguation per occurrence, returns a list of possible candidates.
* Can be seen as a ranking (rather than classification) task: query instance in, ranked list of target URIs out.
*
* @param sfOccurrence
* @param k
* @return
* @throws SearchException
* @throws ItemNotFoundException
* @throws InputException
*/
//TODO consider moving this to CandidateSelector / CandidateSearcher interface
public List<DBpediaResourceOccurrence> bestK(SurfaceFormOccurrence sfOccurrence, int k) throws SearchException, ItemNotFoundException, InputException;
/**
* Every disambiguator has a name that describes its settings (used in evaluation to compare results)
* @return a short description of the Disambiguator
*/
public String name();
/**
* Every disambiguator should know how to measure the ambiguity of a surface form.
* @param sf
* @return ambiguity of surface form (number of candidates)
*/
public int ambiguity(SurfaceForm sf) throws SearchException;
/**
* Counts how many occurrences we indexed for a given URI. (size of training set for that URI)
* @param resource
* @return
* @throws SearchException
*/
public int support(DBpediaResource resource) throws SearchException;
public List<Explanation> explain(DBpediaResourceOccurrence goldStandardOccurrence, int nExplanations) throws SearchException;
public int contextTermsNumber(DBpediaResource resource) throws SearchException;
public double averageIdf(Text context) throws IOException;
}
@@ -1,38 +1,38 @@
/**
* Copyright 2011 Pablo Mendes, Max Jakob
*
* Licensed 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.dbpedia.spotlight.exceptions;
/**
* Used by (external) annotation clients to communicate an error when trying to annotate text.
*
* @author pablomendes
*/
public class AnnotationException extends Exception {
public AnnotationException(String msg, Exception e) {
super(msg,e);
}
public AnnotationException(String msg) {
super(msg);
}
public AnnotationException(Exception e) {
super(e);
}
/**
* Copyright 2011 Pablo Mendes, Max Jakob
*
* Licensed 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.dbpedia.spotlight.exceptions;
/**
* Used by (external) annotation clients to communicate an error when trying to annotate text.
*
* @author pablomendes
*/
public class AnnotationException extends Exception {
public AnnotationException(String msg, Exception e) {
super(msg,e);
}
public AnnotationException(String msg) {
super(msg);
}
public AnnotationException(Exception e) {
super(e);
}
}
Oops, something went wrong.

0 comments on commit d05d940

Please sign in to comment.