• Home
  • Raw
  • Download

Lines Matching full:annotator

17 #include "annotator/annotator.h"
29 #include "annotator/collections.h"
30 #include "annotator/datetime/grammar-parser.h"
31 #include "annotator/datetime/regex-parser.h"
32 #include "annotator/flatbuffer-utils.h"
33 #include "annotator/knowledge/knowledge-engine-types.h"
34 #include "annotator/model_generated.h"
35 #include "annotator/types.h"
59 const std::string& Annotator::kPhoneCollection =
61 const std::string& Annotator::kAddressCollection =
63 const std::string& Annotator::kDateCollection =
65 const std::string& Annotator::kUrlCollection =
67 const std::string& Annotator::kEmailCollection =
156 std::unique_ptr<Annotator> Annotator::FromUnownedBuffer( in FromUnownedBuffer()
164 auto classifier = std::unique_ptr<Annotator>(new Annotator()); in FromUnownedBuffer()
176 std::unique_ptr<Annotator> Annotator::FromString( in FromString()
179 auto classifier = std::unique_ptr<Annotator>(new Annotator()); in FromString()
197 std::unique_ptr<Annotator> Annotator::FromScopedMmap( in FromScopedMmap()
212 auto classifier = std::unique_ptr<Annotator>(new Annotator()); in FromScopedMmap()
225 std::unique_ptr<Annotator> Annotator::FromScopedMmap( in FromScopedMmap()
240 auto classifier = std::unique_ptr<Annotator>(new Annotator()); in FromScopedMmap()
253 std::unique_ptr<Annotator> Annotator::FromFileDescriptor( in FromFileDescriptor()
260 std::unique_ptr<Annotator> Annotator::FromFileDescriptor( in FromFileDescriptor()
267 std::unique_ptr<Annotator> Annotator::FromFileDescriptor( in FromFileDescriptor()
273 std::unique_ptr<Annotator> Annotator::FromFileDescriptor( in FromFileDescriptor()
280 std::unique_ptr<Annotator> Annotator::FromPath(const std::string& path, in FromPath()
287 std::unique_ptr<Annotator> Annotator::FromPath( in FromPath()
294 void Annotator::ValidateAndInitialize(const Model* model, const UniLib* unilib, in ValidateAndInitialize()
561 bool Annotator::InitializeRegexModel(ZlibDecompressor* decompressor) { in InitializeRegexModel()
598 bool Annotator::InitializeKnowledgeEngine( in InitializeKnowledgeEngine()
615 bool Annotator::InitializeContactEngine(const std::string& serialized_config) { in InitializeContactEngine()
627 void Annotator::CleanUpContactEngine() { in CleanUpContactEngine()
636 bool Annotator::InitializeInstalledAppEngine( in InitializeInstalledAppEngine()
650 bool Annotator::SetLangId(const libtextclassifier3::mobile::lang_id::LangId* lang_id) { in SetLangId()
666 bool Annotator::InitializePersonNameEngineFromUnownedBuffer(const void* buffer, in InitializePersonNameEngineFromUnownedBuffer()
690 bool Annotator::InitializePersonNameEngineFromScopedMmap( in InitializePersonNameEngineFromScopedMmap()
701 bool Annotator::InitializePersonNameEngineFromPath(const std::string& path) { in InitializePersonNameEngineFromPath()
706 bool Annotator::InitializePersonNameEngineFromFileDescriptor(int fd, int offset, in InitializePersonNameEngineFromFileDescriptor()
712 bool Annotator::InitializeExperimentalAnnotators() { in InitializeExperimentalAnnotators()
760 bool Annotator::FilteredForAnnotation(const AnnotatedSpan& span) const { in FilteredForAnnotation()
767 bool Annotator::FilteredForClassification( in FilteredForClassification()
773 bool Annotator::FilteredForSelection(const AnnotatedSpan& span) const { in FilteredForSelection()
789 float Annotator::GetPriorityScore( in GetPriorityScore()
802 bool Annotator::VerifyRegexMatchCandidate( in VerifyRegexMatchCandidate()
826 CodepointSpan Annotator::SuggestSelection( in SuggestSelection()
951 TC3_LOG(ERROR) << "Number annotator failed in suggest selection."; in SuggestSelection()
958 TC3_LOG(ERROR) << "Duration annotator failed in suggest selection."; in SuggestSelection()
1077 bool Annotator::ResolveConflicts( in ResolveConflicts()
1157 bool Annotator::ResolveConflict( in ResolveConflict()
1268 bool Annotator::ModelSuggestSelection( in ModelSuggestSelection()
1413 TokenSpan Annotator::ClassifyTextUpperBoundNeededTokens() const { in ClassifyTextUpperBoundNeededTokens()
1444 bool Annotator::ModelClassifyText( in ModelClassifyText()
1463 bool Annotator::ModelClassifyText( in ModelClassifyText()
1641 bool Annotator::RegexClassifyText( in RegexClassifyText()
1699 bool Annotator::DatetimeClassifyText( in DatetimeClassifyText()
1746 std::vector<ClassificationResult> Annotator::ClassifyText( in ClassifyText()
1864 // Try the number annotator. in ClassifyText()
1874 // Try the duration annotator. in ClassifyText()
1884 // Try the translate annotator. in ClassifyText()
1973 bool Annotator::ModelAnnotate( in ModelAnnotate()
2113 const FeatureProcessor* Annotator::SelectionFeatureProcessorForTests() const { in SelectionFeatureProcessorForTests()
2117 const FeatureProcessor* Annotator::ClassificationFeatureProcessorForTests() in ClassificationFeatureProcessorForTests()
2122 const DatetimeParser* Annotator::DatetimeParserForTests() const { in DatetimeParserForTests()
2126 void Annotator::RemoveNotEnabledEntityTypes( in RemoveNotEnabledEntityTypes()
2149 void Annotator::AddContactMetadataToKnowledgeClassificationResults( in AddContactMetadataToKnowledgeClassificationResults()
2162 Status Annotator::AnnotateSingleInput( in AnnotateSingleInput()
2205 // Optimization could be made to only do this when an annotator that uses in AnnotateSingleInput()
2256 // Annotate with the number annotator. in AnnotateSingleInput()
2264 "Couldn't run number annotator FindAll."); in AnnotateSingleInput()
2267 // Annotate with the duration annotator. in AnnotateSingleInput()
2275 "Couldn't run duration annotator FindAll."); in AnnotateSingleInput()
2295 // Annotate with the POD NER annotator. in AnnotateSingleInput()
2301 return Status(StatusCode::INTERNAL, "Couldn't run POD NER annotator."); in AnnotateSingleInput()
2304 // Annotate with the vocab annotator. in AnnotateSingleInput()
2312 return Status(StatusCode::INTERNAL, "Couldn't run vocab annotator."); in AnnotateSingleInput()
2315 // Annotate with the experimental annotator. in AnnotateSingleInput()
2320 return Status(StatusCode::INTERNAL, "Couldn't run experimental annotator."); in AnnotateSingleInput()
2388 StatusOr<Annotations> Annotator::AnnotateStructuredInput( in AnnotateStructuredInput()
2423 // The annotator engines shouldn't change the number of annotation vectors. in AnnotateStructuredInput()
2468 std::vector<AnnotatedSpan> Annotator::Annotate( in Annotate()
2494 CodepointSpan Annotator::ComputeSelectionBoundaries( in ComputeSelectionBoundaries()
2535 bool Annotator::HasEntityData(const RegexModel_::Pattern* pattern) const { in HasEntityData()
2554 bool Annotator::SerializedEntityDataFromRegexMatch( in SerializedEntityDataFromRegexMatch()
2645 void Annotator::GetMoneyQuantityFromCapturingGroup( in GetMoneyQuantityFromCapturingGroup()
2679 bool Annotator::ParseAndFillInMoneyAmount( in ParseAndFillInMoneyAmount()
2784 bool Annotator::IsAnyModelEntityTypeEnabled( in IsAnyModelEntityTypeEnabled()
2803 bool Annotator::IsAnyRegexEntityTypeEnabled( in IsAnyRegexEntityTypeEnabled()
2821 bool Annotator::IsAnyPodNerEntityTypeEnabled( in IsAnyPodNerEntityTypeEnabled()
2836 bool Annotator::RegexChunk(const UnicodeText& context_unicode, in RegexChunk()
2911 bool Annotator::ModelChunk(int num_tokens, const TokenSpan& span_of_interest, in ModelChunk()
2995 bool Annotator::ModelClickContextScoreChunks( in ModelClickContextScoreChunks()
3065 bool Annotator::ModelBoundsSensitiveScoreChunks( in ModelBoundsSensitiveScoreChunks()
3152 bool Annotator::DatetimeChunk(const UnicodeText& context_unicode, in DatetimeChunk()
3193 const Model* Annotator::model() const { return model_; } in model()
3194 const reflection::Schema* Annotator::entity_data_schema() const { in entity_data_schema()
3206 StatusOr<std::string> Annotator::LookUpKnowledgeEntity( in LookUpKnowledgeEntity()
3215 StatusOr<std::string> Annotator::LookUpKnowledgeEntityProperty( in LookUpKnowledgeEntityProperty()