diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/build.gradle b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/build.gradle new file mode 100644 index 0000000..066cf27 --- /dev/null +++ b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/build.gradle @@ -0,0 +1,47 @@ +ext.pluginApiVersion = '8.7.0' +ext.luceneVersion = '9.5.0' + +buildscript { + ext.pluginApiVersion = '8.7.0' + repositories { + mavenCentral() + } + dependencies { + classpath "org.elasticsearch.gradle:build-tools:${pluginApiVersion}" + } +} + +apply plugin: 'elasticsearch.stable-esplugin' +apply plugin: 'elasticsearch.yaml-rest-test' + +esplugin { + name 'analysis-sefaria-naive-lemmatizer-less-prefixes' + description 'Sefaria analyzer' +} + +group 'org.sefaria.sefariaplugin' +version '1.0-SNAPSHOT' + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + + compileOnly "org.elasticsearch.plugin:elasticsearch-plugin-api:${pluginApiVersion}" + compileOnly "org.elasticsearch.plugin:elasticsearch-plugin-analysis-api:${pluginApiVersion}" + compileOnly "org.apache.lucene:lucene-analysis-common:${luceneVersion}" + + testImplementation "org.elasticsearch.plugin:elasticsearch-plugin-api:${pluginApiVersion}" + testImplementation "org.elasticsearch.plugin:elasticsearch-plugin-analysis-api:${pluginApiVersion}" + testImplementation "org.apache.lucene:lucene-analysis-common:${luceneVersion}" + + testImplementation ('junit:junit:4.13.2'){ + exclude group: 'org.hamcrest' + } + testImplementation 'org.mockito:mockito-core:4.4.0' + testImplementation 'org.hamcrest:hamcrest:2.2' + +} + diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/es-plugin.properties b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/es-plugin.properties deleted file mode 100644 index ddd893a..0000000 --- a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/es-plugin.properties +++ /dev/null @@ -1 +0,0 @@ -plugin=org.sefaria.sefariaplugin.plugin.SefariaPlugin \ No newline at end of file diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch.zip b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch.zip deleted file mode 100644 index b88c4d1..0000000 Binary files a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch.zip and /dev/null differ diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch/elasticsearch-analysis-sefaria.jar b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch/elasticsearch-analysis-sefaria.jar deleted file mode 100644 index 22f2995..0000000 Binary files a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch/elasticsearch-analysis-sefaria.jar and /dev/null differ diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch/plugin-descriptor.properties b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch/plugin-descriptor.properties deleted file mode 100644 index b8b729c..0000000 --- a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/out/artifacts/elasticsearch/plugin-descriptor.properties +++ /dev/null @@ -1,6 +0,0 @@ -name=analysis-sefaria-naive-lemmatizer-less-prefixes -description=Sefaria analyzer powered by Noah -classname=org.sefaria.sefariaplugin.plugin.SefariaPlugin -elasticsearch.version=7.17.5 -java.version=1.8 -version=7.17.5 diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/plugin-descriptor.properties b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/plugin-descriptor.properties deleted file mode 100644 index 9b4f3d7..0000000 --- a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/plugin-descriptor.properties +++ /dev/null @@ -1,6 +0,0 @@ -name=analysis-sefaria-naive-lemmatizer-less-prefixes -description=Sefaria analyzer powered by Noah -classname=org.sefaria.sefariaplugin.plugin.SefariaPlugin -elasticsearch.version=6.2.3 -java.version=1.8 -version=6.2.3 diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/pom.xml b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/pom.xml deleted file mode 100644 index 25e0e28..0000000 --- a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - 4.0.0 - - org.sefaria.sefaria-analysis - elasticsearch-analysis-sefaria - 1.0-SNAPSHOT - jar - elasticsearch-analysis-sefaria - http://sefaria.org - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.3.1 - - out/artifacts/elasticsearch - - - - - - - UTF-8 - 7.2.1 - 6.2.3 - 1.0.0 - 11 - 11 - - - - - org.apache.lucene - lucene-test-framework - ${lucene.version} - test - - - org.apache.lucene - lucene-core - ${lucene.version} - provided - - - org.apache.lucene - lucene-analyzers-common - ${lucene.version} - provided - - - org.elasticsearch - elasticsearch - ${elasticsearch.version} - provided - - - com.google.guava - guava - 17.0 - provided - - - junit - junit - 4.11 - test - - - \ No newline at end of file diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/src/main/java/org/sefaria/sefariaplugin/plugin/SefariaAnalyzerProvider.java b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/src/main/java/org/sefaria/sefariaplugin/plugin/SefariaAnalyzerProvider.java deleted file mode 100644 index 65f2ef7..0000000 --- a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/src/main/java/org/sefaria/sefariaplugin/plugin/SefariaAnalyzerProvider.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.sefaria.sefariaplugin.plugin; - -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.analysis.AbstractIndexAnalyzerProvider; -import org.sefaria.sefariaplugin.analysis.SefariaAnalyzer; - -public class SefariaAnalyzerProvider extends AbstractIndexAnalyzerProvider { - private final SefariaAnalyzer analyzer; - - public SefariaAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); - - analyzer = new SefariaAnalyzer(); - } - - @Override public SefariaAnalyzer get() { - return this.analyzer; - } -} diff --git a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/src/main/java/org/sefaria/sefariaplugin/plugin/SefariaPlugin.java b/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/src/main/java/org/sefaria/sefariaplugin/plugin/SefariaPlugin.java deleted file mode 100644 index 3395710..0000000 --- a/Sefaria-ElasticSearch-naive-lemmatizer-less-prefixes/src/main/java/org/sefaria/sefariaplugin/plugin/SefariaPlugin.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.sefaria.sefariaplugin.plugin; -import org.apache.lucene.analysis.Analyzer; -import org.elasticsearch.index.analysis.AnalyzerProvider; -import org.elasticsearch.indices.analysis.AnalysisModule; -import org.elasticsearch.plugins.AnalysisPlugin; -import org.elasticsearch.plugins.Plugin; - -import java.util.HashMap; -import java.util.Map; - -public class SefariaPlugin extends Plugin implements AnalysisPlugin { - - @Override - public Map>> getAnalyzers() { - Map>> extra = new HashMap<>(); - - extra.put("sefaria-naive-lemmatizer-less-prefixes", SefariaAnalyzerProvider::new); - - return extra; - } - -} diff --git a/Sefaria-ElasticSearch-naive-lemmatizer/build.gradle b/Sefaria-ElasticSearch-naive-lemmatizer/build.gradle index 6f037d1..33c4e5b 100644 --- a/Sefaria-ElasticSearch-naive-lemmatizer/build.gradle +++ b/Sefaria-ElasticSearch-naive-lemmatizer/build.gradle @@ -16,7 +16,7 @@ apply plugin: 'elasticsearch.yaml-rest-test' esplugin { name 'analysis-sefaria-naive-lemmatizer' - description 'My analysis plugin' + description 'Sefaria analyzer' } group 'org.sefaria.sefariaplugin'