1 // Copyright (C) 2024 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #include <memory> 16 #include <string> 17 18 #include "icing/text_classifier/lib3/utils/base/statusor.h" 19 #include "icing/expand/stemming/simple/none-stemmer.h" 20 #include "icing/expand/stemming/stemmer.h" 21 22 namespace icing { 23 namespace lib { 24 25 namespace stemmer_factory { 26 27 // Creates a dummy stemmer that returns the input word as the stem. 28 // The language_code is ignored in this implementation. Create(std::string language_code)29libtextclassifier3::StatusOr<std::unique_ptr<Stemmer>> Create( 30 std::string language_code) { 31 return std::make_unique<NoneStemmer>(); 32 } 33 IsStemmingEnabled()34bool IsStemmingEnabled() { return false; } 35 36 } // namespace stemmer_factory 37 38 } // namespace lib 39 } // namespace icing 40