Jazkal Posted June 27, 2022 Share Posted June 27, 2022 (edited) Hello everybody. I'm looking for ideas on how to deal with finding patterns in raw data, when the pattern may not be known ahead of time. I have lots of lists of some small, but mostly blocks of large number strings. I need to be able to sort out the patterns and identify the ones that are repeating. As an example, here is one of the strings: 11235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011 As you can see visually in the block, there is a repeating number sequence. But in this sequence itself, there are repeating patterns. These other patterns show up in other data blocks, and I need to index them to related sequences. 14594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314594370774156178538190998752796516730336954932572910112358314 Here is a second block with the related sequences. I'm mainly looking for direction in how to tackle the issue. Thanks for looking. Edited June 27, 2022 by Jazkal added images of blocks Link to comment Share on other sites More sharing options...
jchd Posted June 27, 2022 Share Posted June 27, 2022 Maybe you can mimic algorithms used to detect sequences in DNA data. Google for that. For instance: https://pastel.archives-ouvertes.fr/tel-01762479/document RTFC 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
UEZ Posted June 27, 2022 Share Posted June 27, 2022 Something like this here?: #include <Array.au3> Global $s = "11235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011235831459437077415617853819099875279651673033695493257291011" Global $len = Int(StringLen($s) / 2), $rp For $i = 2 To $len $rp = StringMid($s, 1, $i) $a = StringSplit($s, $rp, 2) If UBound($a) < $len Then ConsoleWrite(_ArrayToString($a) & @CRLF) EndIf Next Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Jazkal Posted June 27, 2022 Author Share Posted June 27, 2022 UEZ, That is an approach I hadn't thought of. I'll play more with that. 2 hours ago, jchd said: Maybe you can mimic algorithms used to detect sequences in DNA data. Google for that. For instance: https://pastel.archives-ouvertes.fr/tel-01762479/document jacd, first pass of the white paper, and I think this is what I need. I knew it was out there, but I couldn't find it looking though my math encyclopedia. Thanks for leading me to that. Link to comment Share on other sites More sharing options...
jchd Posted June 27, 2022 Share Posted June 27, 2022 This is one of the application domains for Bloom filters. I'm sure there is significant litterature about dissecting DNA sequences and by extension sequences of symbols repeating in a large string of symbols in a given set, here digits. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now