Pattern.any entity
Important
LUIS will be retired on October 1st 2025 and starting April 1st 2023 you will not be able to create new LUIS resources. We recommend migrating your LUIS applications to conversational language understanding to benefit from continued product support and multilingual capabilities.
Pattern.any is a variable-length placeholder used only in a pattern's template utterance to mark where the entity begins and ends.
Pattern.any entities need to be marked in the Pattern template examples, not the intent user examples.
The entity is a good fit when:
- The ending of the entity can be confused with the remaining text of the utterance.
Usage
Given a client application that searches for books based on title, the pattern.any extracts the complete title. A template utterance using pattern.any for this book search is Was {BookTitle} written by an American this year[?]
.
In the following table, each row has two versions of the utterance. The top utterance is how LUIS initially sees the utterance. It isn't clear where the book title begins and ends. The bottom utterance uses a Pattern.any entity to mark the beginning and end of the entity.
Utterance with entity in bold |
---|
Was The Man Who Mistook His Wife for a Hat and Other Clinical Tales written by an American this year? Was The Man Who Mistook His Wife for a Hat and Other Clinical Tales written by an American this year? |
Was Half Asleep in Frog Pajamas written by an American this year? Was Half Asleep in Frog Pajamas written by an American this year? |
Was The Particular Sadness of Lemon Cake: A Novel written by an American this year? Was The Particular Sadness of Lemon Cake: A Novel written by an American this year? |
Was There's A Wocket In My Pocket! written by an American this year? Was There's A Wocket In My Pocket! written by an American this year? |
Example JSON
Consider the following query:
where is the form Understand your responsibilities as a member of the community and who needs to sign it after I read it?
With the embedded form name to extract as a Pattern.any:
Understand your responsibilities as a member of the community
"entities": [
{
"entity": "understand your responsibilities as a member of the community",
"type": "FormName",
"startIndex": 18,
"endIndex": 78,
"role": ""
}
Next steps
In this tutorial, use the Pattern.any entity to extract data from utterances where the utterances are well-formatted and where the end of the data may be easily confused with the remaining words of the utterance.