Home
last modified time | relevance | path

Searched refs:entityType (Results 1 – 8 of 8) sorted by relevance

/frameworks/base/core/java/android/view/textclassifier/
DGenerateLinksLogger.java81 final String entityType = link.getEntity(0); in logGenerateLinks() local
82 if (entityType == null in logGenerateLinks()
83 || TextClassifier.TYPE_OTHER.equals(entityType) in logGenerateLinks()
84 || TextClassifier.TYPE_UNKNOWN.equals(entityType)) { in logGenerateLinks()
88 perEntityTypeStats.computeIfAbsent(entityType, k -> new LinkifyStats()).countLink(link); in logGenerateLinks()
113 private void writeStats(String callId, String callingPackageName, @Nullable String entityType, in writeStats() argument
122 if (entityType != null) { in writeStats()
123 log.addTaggedData(MetricsEvent.FIELD_LINKIFY_ENTITY_TYPE, entityType); in writeStats()
135 final String entityType = Objects.toString( in debugLog() local
147 String.format(Locale.US, "%s:%s %d links (%d/%d chars) %dms %s", callId, entityType, in debugLog()
DSelectionEvent.java146 @EventType int eventType, @EntityType String entityType, in SelectionEvent() argument
152 mEntityType = Preconditions.checkNotNull(entityType); in SelectionEvent()
261 final String entityType = classification.getEntityCount() > 0 in createSelectionModifiedEvent() local
266 entityType, INVOCATION_UNKNOWN, classification.getId()); in createSelectionModifiedEvent()
285 final String entityType = selection.getEntityCount() > 0 in createSelectionModifiedEvent() local
290 entityType, INVOCATION_UNKNOWN, selection.getId()); in createSelectionModifiedEvent()
334 final String entityType = classification.getEntityCount() > 0 in createSelectionActionEvent() local
337 return new SelectionEvent(start, end, actionType, entityType, INVOCATION_UNKNOWN, in createSelectionActionEvent()
DTextClassifier.java737 TextLinks.Builder links, String string, @EntityType String entityType) { in addLinks() argument
739 if (Linkify.addLinks(spannable, linkMask(entityType))) { in addLinks()
745 entityScores(entityType), in addLinks()
752 private static int linkMask(@EntityType String entityType) { in linkMask() argument
753 switch (entityType) { in linkMask()
766 private static Map<String, Float> entityScores(@EntityType String entityType) { in entityScores() argument
768 scores.put(entityType, 1f); in entityScores()
DTextLinks.java279 @EntityType String entityType) { in getConfidenceScore()
280 return mEntityScores.getConfidenceScore(entityType); in getConfidenceScore()
DTextClassifierEvent.java401 final String entityType = getEntityTypes().length > 0 in toSelectionEvent() local
407 entityType, in toSelectionEvent()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassifierEventTest.java77 final String entityType = TEXT_SELECTION.getEntity(0); in toSelectionEvent_smartSelectionMulti() local
84 .setEntityTypes(entityType) in toSelectionEvent_smartSelectionMulti()
85 .setScores(TEXT_SELECTION.getConfidenceScore(entityType)) in toSelectionEvent_smartSelectionMulti()
106 final String entityType = TEXT_SELECTION.getEntity(0); in toSelectionEvent_smartSelectionSingle() local
113 .setEntityTypes(entityType) in toSelectionEvent_smartSelectionSingle()
114 .setScores(TEXT_SELECTION.getConfidenceScore(entityType)) in toSelectionEvent_smartSelectionSingle()
138 final String entityType = TEXT_CLASSIFICATION.getEntity(0); in toSelectionEvent_resetSelection() local
148 .setScores(TEXT_CLASSIFICATION.getConfidenceScore(entityType)) in toSelectionEvent_resetSelection()
229 final String entityType = TEXT_CLASSIFICATION.getEntity(0); in toSelectionEvent_link_smartAction() local
234 .setEntityTypes(entityType) in toSelectionEvent_link_smartAction()
[all …]
/frameworks/base/core/java/android/view/textclassifier/logging/
DSmartSelectionEventTracker.java432 @TextClassifier.EntityType String entityType, String versionTag) { in SelectionEvent() argument
437 mEntityType = Preconditions.checkNotNull(entityType); in SelectionEvent()
479 final String entityType = classification.getEntityCount() > 0 in selectionModified() local
484 start, end, EventType.SELECTION_MODIFIED, entityType, versionTag); in selectionModified()
510 final String entityType = selection.getEntityCount() > 0 in selectionModified() local
514 return new SelectionEvent(start, end, eventType, entityType, versionTag); in selectionModified()
547 final String entityType = classification.getEntityCount() > 0 in selectionAction() local
551 return new SelectionEvent(start, end, actionType, entityType, versionTag); in selectionAction()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/logging/
DGenerateLinksLoggerTest.java92 private void assertHasLog(List<LogMaker> logs, String entityType, int numLinks, in assertHasLog() argument
95 if (!entityType.equals(getEntityType(log))) { in assertHasLog()
106 fail("No log for entity type \"" + entityType + "\""); in assertHasLog()