async def rank(self) -> Optional[float]:
if not self.request.has_layer(l.RawText):<EOL><INDENT>return<EOL><DEDENT>tl = self.request.get_layer(l.RawText)<EOL>matcher = Matcher([<EOL>tuple(Trigram(y) for y in x)<EOL>for x in await self.intent.strings(self.request)<EOL>])<EOL>return matcher % Trigram(tl.text)<EOL>
If there is a text layer inside the request, try to find a matching
text in the specified intent.