Skip to Content

AI-900: How does Pattern.any entity work for pattern-based recognition in Azure AI Language?

Which Azure NLP entity type identifies phone numbers using predefined patterns?

Learn about Azure AI Language entity types for the AI-900 exam. Understand why Pattern.any is the correct entity type for identifying phone numbers based on predefined patterns like digit sequences, and how it differs from machine-learned, prebuilt, and regular expression entities.

Question

Which type of natural language processing (NLP) entity in Azure AI is used to identify a phone number based on a predefined pattern, such as a sequence of digits in a specific format?

A. Machine-learned
B. Prebuilt entity
C. Pattern.any
D. Regular expression

Answer

C. Pattern.any

Explanation

The correct type of natural language processing entity for identifying a phone number based on a predefined pattern is C. Pattern.any. This entity type is specifically designed to match text based on flexible pattern definitions.

Understanding Pattern.any Entity

Pattern.any is a specialized entity type in Azure AI Language (formerly Language Understanding – LUIS) that excels at identifying entities with variable-length patterns. For phone numbers, this entity can be configured to recognize various formats such as (555) 123-4567, 555-123-4567, or +1-555-123-4567. The key characteristic of Pattern.any is its ability to handle patterns where the length and exact format may vary, making it ideal for phone numbers which can appear in multiple formats within the same text.

How Pattern.any Works

This entity type uses pattern-matching algorithms that can accommodate variations in formatting while still maintaining the core structure. For phone numbers, you would define a pattern template that specifies where digits should appear, where separators (hyphens, spaces, parentheses) are optional, and how the overall structure should be recognized. The entity can then identify phone numbers even when they don’t exactly match a rigid regular expression.

Why Other Options Are Incorrect

  • Machine-learned: These entities rely on training data and machine learning algorithms to identify entities based on context and examples. While they can learn to recognize phone numbers, they are not optimized for pattern-based recognition like Pattern.any.
  • Prebuilt entity: Azure provides prebuilt entities for common data types, but phone numbers are not included in the standard prebuilt entity set. Prebuilt entities cover items like dates, numbers, and currencies.
  • Regular expression: While regular expressions can match phone number patterns, they are not a native entity type in Azure AI Language services. Regular expressions are typically too rigid for the flexible pattern matching that Pattern.any provides.

How does Pattern.any entity work for pattern-based recognition in Azure AI Language?

Microsoft Azure AI Fundamentals AI-900 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Fundamentals AI-900 exam and earn Microsoft Azure AI Fundamentals AI-900 certification.