Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
StringTools[ApproximateSearch] - find the first approximate occurrences of a string in another string
StringTools[ApproximateSearchAll] - find all approximate occurrences of a string in another string
Calling Sequence
ApproximateSearch( pattern, text, k )
ApproximateSearchAll( pattern, text, k )
Parameters
pattern
-
string; pattern
text
string; text to search
k
non-negative integer; maximum edit distance
Description
The ApproximateSearch(pattern, text, k) command locates the first occurrence of a substring of the string text that is close to the string pattern in terms of its Levenshtein distance from pattern. Specifically, it locates the first such substring whose Levenshtein distance from pattern is less than or equal to k.
The ApproximateSearchAll(pattern, text, k) command locates all occurrences of substrings of the string text that are within Levenshtein distance k of the string pattern. An expression sequence of offsets marking the ends of matches is returned.
Note that for , approximate searching degenerates into exact searching, for which StringTools[Search] and StringTools[SearchAll] provide faster algorithms.
If , then every possible substring of text with length equal to the length of pattern matches pattern.
For a related concept that uses the Hamming metric instead of the edit distance, see StringTools[HammingSearch].
Examples
See Also
searchtext, string, StringTools, StringTools[HammingDistance], StringTools[HammingSearch], StringTools[HammingSearchAll], StringTools[Levenshtein], StringTools[Search], StringTools[SearchAll]
Download Help Document