diff --git a/README.md b/README.md index 34d514ee378..487b195a48d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Phonetic Analysis for ElasticSearch +Phonetic Analysis for Elasticsearch =================================== The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch. @@ -57,7 +57,7 @@ License This software is licensed under the Apache 2 license, quoted below. - Copyright 2009-2013 Shay Banon and ElasticSearch + Copyright 2009-2014 Elasticsearch 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 diff --git a/src/main/java/org/elasticsearch/index/analysis/PhoneticAnalysisBinderProcessor.java b/src/main/java/org/elasticsearch/index/analysis/PhoneticAnalysisBinderProcessor.java index d0cfaee9990..45d7634081e 100644 --- a/src/main/java/org/elasticsearch/index/analysis/PhoneticAnalysisBinderProcessor.java +++ b/src/main/java/org/elasticsearch/index/analysis/PhoneticAnalysisBinderProcessor.java @@ -1,13 +1,13 @@ /* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search 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 + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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 + * 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 diff --git a/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java b/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java index dc491e587ff..02c4803d02d 100644 --- a/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java +++ b/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java @@ -1,13 +1,13 @@ /* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search 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 + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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 + * 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 @@ -16,17 +16,11 @@ * specific language governing permissions and limitations * under the License. */ + package org.elasticsearch.index.analysis; -import java.util.Arrays; -import java.util.HashSet; import org.apache.commons.codec.Encoder; -import org.apache.commons.codec.language.Caverphone1; -import org.apache.commons.codec.language.Caverphone2; -import org.apache.commons.codec.language.ColognePhonetic; -import org.apache.commons.codec.language.Metaphone; -import org.apache.commons.codec.language.RefinedSoundex; -import org.apache.commons.codec.language.Soundex; +import org.apache.commons.codec.language.*; import org.apache.commons.codec.language.bm.Languages.LanguageSet; import org.apache.commons.codec.language.bm.NameType; import org.apache.commons.codec.language.bm.PhoneticEngine; @@ -45,6 +39,9 @@ import org.elasticsearch.index.analysis.phonetic.KoelnerPhonetik; import org.elasticsearch.index.analysis.phonetic.Nysiis; import org.elasticsearch.index.settings.IndexSettings; +import java.util.Arrays; +import java.util.HashSet; + /** * */ @@ -132,4 +129,4 @@ public class PhoneticTokenFilterFactory extends AbstractTokenFilterFactory { } throw new ElasticSearchIllegalArgumentException("encoder error"); } -} \ No newline at end of file +} diff --git a/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java b/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java index 7526f205cda..880bc00cace 100644 --- a/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java +++ b/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java @@ -1,11 +1,11 @@ /* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search 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 + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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 * @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + package org.elasticsearch.index.analysis.phonetic; /** diff --git a/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java b/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java index 3086a5aeda7..a3190fa4686 100644 --- a/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java +++ b/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java @@ -1,11 +1,11 @@ /* - * Licensed to Elastic Search and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Elastic Search 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 + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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 * @@ -16,19 +16,16 @@ * specific language governing permissions and limitations * under the License. */ + package org.elasticsearch.index.analysis.phonetic; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import org.apache.commons.codec.EncoderException; import org.apache.commons.codec.StringEncoder; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Kölner Phonetik * diff --git a/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java b/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java index 6275b84677a..3b85ef43915 100644 --- a/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java +++ b/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java @@ -1,25 +1,29 @@ /* - * 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. + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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.elasticsearch.index.analysis.phonetic; -import java.util.regex.Pattern; import org.apache.commons.codec.EncoderException; import org.apache.commons.codec.StringEncoder; +import java.util.regex.Pattern; + /** * * Taken from commons-codec trunk (unreleased yet) @@ -322,4 +326,4 @@ public class Nysiis implements StringEncoder { } return new String(chars, 0, count).toUpperCase(java.util.Locale.ENGLISH); } -} \ No newline at end of file +} diff --git a/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java b/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java index a99238fc40f..dacea45e049 100644 --- a/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java +++ b/src/main/java/org/elasticsearch/plugin/analysis/AnalysisPhoneticPlugin.java @@ -1,11 +1,11 @@ /* - * Licensed to ElasticSearch and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. ElasticSearch 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 + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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 * diff --git a/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java b/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java index 726e267db04..70f69fdbced 100644 --- a/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java +++ b/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java @@ -1,3 +1,22 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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.elasticsearch.index.analysis; import org.elasticsearch.common.inject.Injector;