[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-686267-105":3,"doc-detail-686267-en":80,"detail-sidebar-cat-0-en-105":102,"doc-similar-686267":149},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","fast-searching-for-multiple-keywords-in-multiple-texts-version-0-description","Fast Searching for Multiple Keywords in Multiple Texts - Version 0 - description","","Fast Searching for Multiple Keywords in Multiple Texts describes an Aho-Corasick based approach to locate all keyword occurrences in one or more texts efficiently in O(N+M) time. It builds a trie from input keywords and performs searching through a single function call, optionally grouping results by text or by keyword. The interface supports custom alphabets (ascii, aminoacid, nucleicacid) and provides iteration feedback, while noting that UTF-8/Unicode matching is not currently supported. Documentation includes key functions and usage examples.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/fast-searching-for-multiple-keywords-in-multiple-texts-version-0-description/686267/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/fast-searching-for-multiple-keywords-in-multiple-texts-version-0-description/686267.png","ImageObject",300,407,{"name":42,"@type":43},"The UK Girl","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-28","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"How does AhoCorasickSearch improve search performance for many keywords?","Question",{"text":62,"@type":63},"It builds an Aho-Corasick trie from the keywords and finds all matches in O(N+M) time, scaling linearly with the number of keywords and the text size versus the naive O(N*M) approach.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"Can I search multiple texts and keep matches separated per input text?",{"text":67,"@type":63},"Yes. Use AhoCorasickSearchList to keep matches of each input text separate, and optionally exclude non-matched texts when named inputs are provided.",{"name":69,"@type":60,"acceptedAnswer":70},"What alphabet options are available, and is UTF-8 supported?",{"text":71,"@type":63},"The alphabet parameter supports ascii, aminoacid, and nucleicacid. Matching for UTF-8 (Unicode) is not currently supported, and characters outside the chosen alphabet range cause an error.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},686267,1794034171,{"code":4,"msg":81,"data":82},"success",{"doc_id":78,"user_id":83,"nickname":42,"user_avatar":84,"doc_module":4,"category_id":85,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":86,"file_id":87,"file_url":88,"file_type":89,"file_size":90,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":91,"language":92,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":93,"faqs":94,"seo_title":95,"seo_description":12,"update_tm":79,"read_time":96,"preview_page_count":22,"preview_urls":97},2199028711991,"https://us-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d",6,"Package ‘AhoCorasickTrie’  \nMay 6, 2026  \nType Package  \nTitle Fast Searching for Multiple Keywords in Multiple Texts Version 0.1.3  \nDescription Aho-Corasick is an optimal algorithm for finding many  \nkeywords in a text. It can locate all matches in a text in O(N+M) time; i.e., the time needed scales linearly with the number of keywords (N) and the size of the text (M). Compare this to the naive approach which takes O(N*M) time to loop through each pattern and scan for it in the text. This implementation builds the trie (the generic name of the data structure) and runs the search in a single function call. If you want to search multiple texts with the same trie, the function will take a list or vector of texts and return a list of matches to  \neach text. By default, all 128 ASCII characters are allowed in both the keywordsand the text. A more efficient trie is possible if the alphabet size can be reduced. For example, DNA sequences use at most 19 distinct characters and usually only 4; protein sequences use at most 26 distinct characters and usually only 20 . UTF-8 (Unicode) matching is not currently supported.  \nLicense Apache License 2.0  \nURL [https://github.com/chambm/AhoCorasickTrie](https://github.com/chambm/AhoCorasickTrie)  \nBugReports [https://github.com/chambm/AhoCorasickTrie/issues](https://github.com/chambm/AhoCorasickTrie/issues)[ ](https://github.com/chambm/AhoCorasickTrie/issues)Encoding UTF-8  \nImports Rcpp (>= 0.12.5) LinkingTo Rcpp  \nSuggests microbenchmark, testthat RoxygenNote 7.3.2 NeedsCompilation yes  \nAuthor Matt Chambers [aut, cre],  \nTomas Petricek [aut, cph],  \nVanderbilt University [cph]  \nMaintainer Matt Chambers \u003C[matt.chambers42@gmail.com](matt.chambers42@gmail.com)> Repository CRAN  \nDate/Publication 2025-02-05 00:30:02 UTC  \nContents  \nAhoCorasickSearch ..................................... 2  \nAhoCorasickSearchList ................................... 4  \nAhoCorasickTrie ...................................... 5  \nIndex 7  \n\n| AhoCorasickSearch | Fast searching for one or more keywords in one or more texts |\n| --- | --- |\n\nDescription  \nBuilds an Aho-Corasick trie from one or more keywords and uses it to search one or more texts. For a large number of keywords, Aho-Corasick is much faster than a naive approach (such aslapply(keywords, gregexpr, text)) .  \nUse AhoCorasickSearchList instead of AhoCorasickSearch when you want to keep the matches of each input text separate. If the input texts have names, the resulting list of matches will include those names and non-matched texts will be excluded from the results. If the input texts do not have names, then the resulting list of matches will be in the same order as the input texts, and nonmatched texts will be kept to preserve that order. Thus, it is more efficient to use named input texts (so non-matched texts can be dropped) .  \nThe default alphabet allows all 128 ASCII characters in the keywords and the texts. Characters outside this range will cause an error. A more efficient trie is possible if the alphabet size can be reduced. For example, DNA sequences use at most 19 distinct characters and usually only 4; protein sequences use at most 26 distinct characters and usually only 20 . Set the alphabet parameter if a reduced alphabet is appropriate.  \nUTF-8 (Unicode) matching is not currently supported.  \nUsage  \nAhoCorasickSearch(  \nkeywords,  \ntext,  \nalphabet = \"ascii\",  \ngroupByKeyword = FALSE,  \niterationFeedback = 0L)  \nArguments  \nkeywords Character vector of one or more keywords  \ntext Character vector of one or more texts to search  \nalphabet Alphabet to use; one of ascii, aminoacid, or nucleicacid  \ngroupByKeyword If true, matches are grouped by keyword (instead of by text)  \niterationFeedback  \nWhen set to a positive integer i, console output will indicate when searching every ith text  \nAhoCorasickSearch 3  \nValue  \nList of matches, grouped by either text or by keyword  \nSee Also  \n• Aho-Corasick string matching in C\\# for the article ","cbCaisMq5H44tc0e","https://ap.wps.com/l/cbCaisMq5H44tc0e","pdf",89907,7,"English","# AhoCorasickSearch\n## AhoCorasickSearchList\n## AhoCorasickTrie\n# Index","[{\"question\":\"How does AhoCorasickSearch improve search performance for many keywords?\",\"answer\":\"It builds an Aho-Corasick trie from the keywords and finds all matches in O(N+M) time, scaling linearly with the number of keywords and the text size versus the naive O(N*M) approach.\"},{\"question\":\"Can I search multiple texts and keep matches separated per input text?\",\"answer\":\"Yes. Use AhoCorasickSearchList to keep matches of each input text separate, and optionally exclude non-matched texts when named inputs are provided.\"},{\"question\":\"What alphabet options are available, and is UTF-8 supported?\",\"answer\":\"The alphabet parameter supports ascii, aminoacid, and nucleicacid. Matching for UTF-8 (Unicode) is not currently supported, and characters outside the chosen alphabet range cause an error.\"}]","Fast Searching for Multiple Keywords in Multiple Texts - Version 0 - description | PDF",18,[98],{"page_no":22,"url":99,"width":100,"height":101},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/cf356f464037cb9489d621d9b0604a65.webp",983,1272,{"code":4,"msg":81,"data":103},[104,108,112,116,121,124,128,133,138,141,145],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":109,"show_sort_weight":110,"slug":111},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":113,"show_sort_weight":114,"slug":115},"Exam",70,"exam",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":118,"show_sort_weight":119,"slug":120},5,"Comic",60,"comic",{"id":85,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":122,"slug":123},50,"technology",{"id":91,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":126,"slug":127},"Healthcare",40,"healthcare",{"id":129,"doc_module":4,"doc_module_name":25,"category_name":130,"show_sort_weight":131,"slug":132},8,"Research & Report",30,"research-report",{"id":134,"doc_module":4,"doc_module_name":25,"category_name":135,"show_sort_weight":136,"slug":137},9,"Religion & Spirituality",20,"religion-spirituality",{"id":136,"doc_module":4,"doc_module_name":25,"category_name":139,"show_sort_weight":136,"slug":140},"World Cup","world-cup",{"id":142,"doc_module":4,"doc_module_name":25,"category_name":143,"show_sort_weight":142,"slug":144},10,"Lifestyle","lifestyle",{"id":146,"doc_module":4,"doc_module_name":25,"category_name":147,"show_sort_weight":117,"slug":148},19,"General","general",{"list":150,"token":11},[151,157,163,170,176,183,190,197,204,211],{"doc_id":152,"doc_title":153,"file_type":89,"home_preview_img_url":154,"slug":155,"view_count":33,"category_name":29,"create_tm":156},708353,"The Ultimate Guide to Keyword Research","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230015812036/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=ekRpkEgAiMny%2F%2F70dHcu5R9iU%2BI%3D","the-ultimate-guide-to-keyword-research",1794715045,{"doc_id":158,"doc_title":159,"file_type":89,"home_preview_img_url":160,"slug":161,"view_count":91,"category_name":29,"create_tm":162},346879,"Compare PDF - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911239205/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=raa7g2tHvA8WrMHzk86GT8NXrqg%3D","compare-pdf-introduction",1790063750,{"doc_id":164,"doc_title":165,"file_type":89,"home_preview_img_url":166,"slug":167,"view_count":168,"category_name":29,"create_tm":169},517009,"CHAOS KNIGHTS - Dreaded Host - Renegade Knight Datasheets","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229937519114/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=riSvXjXAtpDOs05p92q16qHC55k%3D","chaos-knights-dreaded-host-renegade-knight-datasheets",12,1791334457,{"doc_id":171,"doc_title":172,"file_type":89,"home_preview_img_url":173,"slug":174,"view_count":33,"category_name":29,"create_tm":175},726375,"RelativityOne - Searching Guide - October 2, 2026","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230028540800/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=2G%2B5PhdwW0pdkk%2Bnnol0AO2LQcA%3D","relativityone-searching-guide-october-2-2026",1795212419,{"doc_id":177,"doc_title":178,"file_type":89,"home_preview_img_url":179,"slug":180,"view_count":181,"category_name":29,"create_tm":182},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=pYw1DQ5DBFzKfJswvgz9uT2Wp%2B0%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",920,1785472614,{"doc_id":184,"doc_title":185,"file_type":89,"home_preview_img_url":186,"slug":187,"view_count":188,"category_name":29,"create_tm":189},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=vGkr7VzfVhldwT3AWr7hhWRvwsM%3D","xnx-universal-transmitter-installation-manual",858,1776135954,{"doc_id":191,"doc_title":192,"file_type":89,"home_preview_img_url":193,"slug":194,"view_count":195,"category_name":29,"create_tm":196},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=zoss8OLj3uN5Y3dcM0EubhMCeMc%3D","the-candlestick-trading-bible-trading-guide",806,1789767270,{"doc_id":198,"doc_title":199,"file_type":89,"home_preview_img_url":200,"slug":201,"view_count":202,"category_name":29,"create_tm":203},176,"Free Fire Proxy Server","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693709822/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=sLexB252uJhQhG%2FAxOgov1TwSRc%3D","free-fire-proxy-server",568,1776135932,{"doc_id":205,"doc_title":206,"file_type":89,"home_preview_img_url":207,"slug":208,"view_count":209,"category_name":29,"create_tm":210},129220,"Operations and Supply Chain Management - Eleventh Edition - Dedicated to students and faculty","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229840674154/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=LL%2FlzRkq3yH0xmNzWJpaDQ0XEw8%3D","operations-and-supply-chain-management-eleventh-edition-dedicated-to-students-and-faculty",498,1786012506,{"doc_id":212,"doc_title":213,"file_type":89,"home_preview_img_url":214,"slug":215,"view_count":216,"category_name":29,"create_tm":217},8566,"Trik Ngonten TikTok dari 0 Sampai FYP","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229696842324/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796134259&Signature=lPv8DeDzpZCa%2Bet3Nf37uxcpmMg%3D","tiktok-content-tricks-from-0-to-fyp",492,1776338393]