From 9d7baa7428e00073372d2220565ca30409fdad65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Wed, 1 Feb 2023 10:18:29 +0000 Subject: [PATCH 1/7] changed dict in stamp constructor from reference to shared ptr --- blobstamper/stamp_dict.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blobstamper/stamp_dict.h b/blobstamper/stamp_dict.h index 49408db..f4b80d8 100644 --- a/blobstamper/stamp_dict.h +++ b/blobstamper/stamp_dict.h @@ -47,4 +47,10 @@ class StampDict: public StampBaseStr int maxSize() override {return stamp_size;} }; +class StampDictLCAlphaSmall : public StampDict +{ + public: + StampDictLCAlphaSmall (): StampDict(std::make_shared()) {}; +}; + #endif /* STAMP_DICT_H */ From 691969b85e998c1c8e694ae598b6bf6a018dd311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Thu, 2 Feb 2023 11:06:05 +0000 Subject: [PATCH 2/7] . --- blobstamper/stamp_text.cpp | 312 +++++++++++++++++++++++++++++++++++++ blobstamper/stamp_text.h | 54 +++++++ 2 files changed, 366 insertions(+) create mode 100644 blobstamper/stamp_text.cpp create mode 100644 blobstamper/stamp_text.h diff --git a/blobstamper/stamp_text.cpp b/blobstamper/stamp_text.cpp new file mode 100644 index 0000000..3b9078c --- /dev/null +++ b/blobstamper/stamp_text.cpp @@ -0,0 +1,312 @@ +/****************************************************************************** + * + * Copyright 2021 Nikolay Shaplov (Postgres Professional) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +#ifndef BLOB_H +#define BLOB_H + +#include"dict.h" + + +size_t +DictBase::size() +{ + return data.size(); +} + +std::string +DictBase::get(size_t n) +{ + return data[n]; +} + + +DictLCAlphaSmall::DictLCAlphaSmall() +{ +/* List below was generated with following perl script + +open(my $fh, "/usr/share/dict/british-english-small"); +my $i=0; +while (my $s=<$fh>) +{ + chomp $s; + if ($s =~ /^[a-z]+$/) + { + print '"'.$s.'"'.",\n" if $i % 157 == 0; + $i++; + } +} +*/ + data = { +"a", +"abundances", +"achieves", +"adjunct", +"affair", +"aired", +"ally", +"amphitheatre", +"annoyance", +"appalled", +"arbitrators", +"artichokes", +"assisting", +"auctioneers", +"awaked", +"balanced", +"barbiturates", +"bawdier", +"beggaring", +"berserk", +"biographies", +"blazer", +"blown", +"bond", +"boundless", +"breaded", +"broadsided", +"buggy", +"burping", +"caches", +"caned", +"cards", +"castoffs", +"cellar", +"chant", +"cheetahs", +"choral", +"citizen", +"cleft", +"clues", +"coined", +"commanding", +"competences", +"concentrate", +"configures", +"conserve", +"contemptuous", +"convertors", +"corpulent", +"counterparts", +"cranking", +"crippled", +"crusades", +"cursing", +"dams", +"debate", +"dedication", +"deign", +"denomination", +"descents", +"detonate", +"differences", +"dirt", +"discouragement", +"dismally", +"dissented", +"divested", +"doorstep", +"dread", +"drunks", +"dying", +"edifices", +"elegant", +"emergency", +"encyclopedia", +"enshrine", +"epitaph", +"eternities", +"excavates", +"exists", +"extends", +"fact", +"fashionably", +"fellow", +"fifteen", +"firms", +"flavourings", +"floured", +"followers", +"forestalled", +"fouler", +"freshens", +"fulfilling", +"galaxy", +"gaudier", +"germs", +"gleam", +"godfather", +"graffiti", +"greened", +"grouping", +"gunshots", +"halved", +"harmonic", +"headrest", +"hems", +"hims", +"holy", +"horrify", +"humans", +"hyphenates", +"illustration", +"impersonated", +"inadequate", +"increase", +"industrious", +"infuriate", +"inquiry", +"insulated", +"intern", +"intuitive", +"irreverence", +"jaws", +"journals", +"kegs", +"kneecap", +"lamentations", +"launder", +"lefts", +"liberated", +"lingoes", +"lobes", +"lords", +"lushes", +"maintaining", +"mannequins", +"mascot", +"meadows", +"men", +"miaows", +"minds", +"misjudge", +"modernise", +"mop", +"mourners", +"muscles", +"narrations", +"neglects", +"nightgowns", +"nostalgia", +"nymph", +"oceans", +"ooze", +"ore", +"outlasted", +"overgrowing", +"overwriting", +"pamper", +"pardon", +"pastiche", +"pearl", +"people", +"perplexity", +"phenomenal", +"pigged", +"pivots", +"pleasured", +"pokers", +"portables", +"powders", +"preface", +"pretzels", +"procedures", +"prom", +"protective", +"puddles", +"purr", +"queasier", +"racquets", +"ranks", +"readable", +"receptionist", +"recuperated", +"refrigerate", +"reiterate", +"reminisces", +"replenishes", +"resemblances", +"resulted", +"reverenced", +"ridiculing", +"robots", +"route", +"rustlers", +"salves", +"savour", +"schoolboy", +"scrounging", +"sedating", +"separates", +"shakiest", +"shined", +"shrewdness", +"significance", +"sitters", +"slakes", +"slogged", +"smoothest", +"snowfalls", +"solidifies", +"sow", +"speeches", +"spongiest", +"squalled", +"stammer", +"stealthy", +"stitches", +"strangers", +"stubbiest", +"subside", +"suitably", +"supplemented", +"swampiest", +"sympathetically", +"taken", +"tattled", +"temperate", +"testicle", +"thirteenths", +"tickles", +"tittered", +"tormentors", +"tragic", +"trappings", +"triggers", +"trusty", +"twigged", +"unburdening", +"undeserved", +"unite", +"unseemly", +"upstream", +"valved", +"verbiage", +"vindicating", +"vortexes", +"want", +"waxes", +"wets", +"whom", +"wipes", +"woolliest", +"wrinkles", +"zanier" + }; +} + +#endif /* DICT_H*/ \ No newline at end of file diff --git a/blobstamper/stamp_text.h b/blobstamper/stamp_text.h new file mode 100644 index 0000000..c4bef66 --- /dev/null +++ b/blobstamper/stamp_text.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * + * Copyright 2021 Nikolay Shaplov (Postgres Professional) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +#ifndef STAMP_TEXT_H +#define STAMP_TEXT_H + + +#include +#include + +#include +#include + +#include + +#include "blobstamper/dict.h" +#include "blobstamper/stamp_dict.h" + +class StampTextSimple: public StampBaseStr +{ + public: + virtual int minSize() override {return 1;} + virtual int maxSize() override {return -1;} + std::string ExtractStr(Blob &blob) override; +}; + +class GalleyTextSimple: public GalleyVectorStrStamp +{ + public: + virtual std::string ExtractStr(Blob &blob) override; +}; + +class GalleyLCAlphaSmall: public GalleyVectorStrStamp +{ + public: + virtual std::string ExtractStr(Blob &blob) override; +}; + +#endif /* STAMP_TEXT_H */ From 9865ac65d8902a0d2f5859d72272ac96c2f41228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Wed, 8 Feb 2023 07:30:01 +0000 Subject: [PATCH 3/7] added stamp_text.cpp and 150-stamp_text.cpp --- blobstamper/stamp_text.cpp | 319 +++++-------------------------------- t/150-stamp_text.cpp | 44 +++++ 2 files changed, 83 insertions(+), 280 deletions(-) create mode 100644 t/150-stamp_text.cpp diff --git a/blobstamper/stamp_text.cpp b/blobstamper/stamp_text.cpp index 3b9078c..2d2d87d 100644 --- a/blobstamper/stamp_text.cpp +++ b/blobstamper/stamp_text.cpp @@ -16,297 +16,56 @@ * ******************************************************************************/ -#ifndef BLOB_H -#define BLOB_H +#include"stamp_text.h" -#include"dict.h" +std::string +StampTextSimple::ExtractStr(Blob &blob) +{ + std::vector data = blob.ChopBlank(*this); -size_t -DictBase::size() -{ - return data.size(); + std::vector::iterator the_iterator; + + the_iterator = data.begin(); + std:: string res; + while (the_iterator != data.end()) + { + if (*the_iterator == '\0') { *the_iterator = ' '; } + res.push_back(*the_iterator++); + } + + return res; } -std::string -DictBase::get(size_t n) +std::string GalleyTextSimple::ExtractStr(Blob &blob) { - return data[n]; -} + std::vector data = ExtractStrVector(blob); + std::string res = ""; + for(std::string s : data) + { + if (!res.empty()) + { + res+=" "; + } + res+= s; + } + return res; +} -DictLCAlphaSmall::DictLCAlphaSmall() +std::string GalleyLCAlphaSmall::ExtractStr(Blob &blob) { -/* List below was generated with following perl script + std::vector data = ExtractStrVector(blob); + std::string res = ""; -open(my $fh, "/usr/share/dict/british-english-small"); -my $i=0; -while (my $s=<$fh>) -{ - chomp $s; - if ($s =~ /^[a-z]+$/) + for(std::string s : data) { - print '"'.$s.'"'.",\n" if $i % 157 == 0; - $i++; + if (!res.empty()) + { + res+=" "; + } + res+= s; } -} -*/ - data = { -"a", -"abundances", -"achieves", -"adjunct", -"affair", -"aired", -"ally", -"amphitheatre", -"annoyance", -"appalled", -"arbitrators", -"artichokes", -"assisting", -"auctioneers", -"awaked", -"balanced", -"barbiturates", -"bawdier", -"beggaring", -"berserk", -"biographies", -"blazer", -"blown", -"bond", -"boundless", -"breaded", -"broadsided", -"buggy", -"burping", -"caches", -"caned", -"cards", -"castoffs", -"cellar", -"chant", -"cheetahs", -"choral", -"citizen", -"cleft", -"clues", -"coined", -"commanding", -"competences", -"concentrate", -"configures", -"conserve", -"contemptuous", -"convertors", -"corpulent", -"counterparts", -"cranking", -"crippled", -"crusades", -"cursing", -"dams", -"debate", -"dedication", -"deign", -"denomination", -"descents", -"detonate", -"differences", -"dirt", -"discouragement", -"dismally", -"dissented", -"divested", -"doorstep", -"dread", -"drunks", -"dying", -"edifices", -"elegant", -"emergency", -"encyclopedia", -"enshrine", -"epitaph", -"eternities", -"excavates", -"exists", -"extends", -"fact", -"fashionably", -"fellow", -"fifteen", -"firms", -"flavourings", -"floured", -"followers", -"forestalled", -"fouler", -"freshens", -"fulfilling", -"galaxy", -"gaudier", -"germs", -"gleam", -"godfather", -"graffiti", -"greened", -"grouping", -"gunshots", -"halved", -"harmonic", -"headrest", -"hems", -"hims", -"holy", -"horrify", -"humans", -"hyphenates", -"illustration", -"impersonated", -"inadequate", -"increase", -"industrious", -"infuriate", -"inquiry", -"insulated", -"intern", -"intuitive", -"irreverence", -"jaws", -"journals", -"kegs", -"kneecap", -"lamentations", -"launder", -"lefts", -"liberated", -"lingoes", -"lobes", -"lords", -"lushes", -"maintaining", -"mannequins", -"mascot", -"meadows", -"men", -"miaows", -"minds", -"misjudge", -"modernise", -"mop", -"mourners", -"muscles", -"narrations", -"neglects", -"nightgowns", -"nostalgia", -"nymph", -"oceans", -"ooze", -"ore", -"outlasted", -"overgrowing", -"overwriting", -"pamper", -"pardon", -"pastiche", -"pearl", -"people", -"perplexity", -"phenomenal", -"pigged", -"pivots", -"pleasured", -"pokers", -"portables", -"powders", -"preface", -"pretzels", -"procedures", -"prom", -"protective", -"puddles", -"purr", -"queasier", -"racquets", -"ranks", -"readable", -"receptionist", -"recuperated", -"refrigerate", -"reiterate", -"reminisces", -"replenishes", -"resemblances", -"resulted", -"reverenced", -"ridiculing", -"robots", -"route", -"rustlers", -"salves", -"savour", -"schoolboy", -"scrounging", -"sedating", -"separates", -"shakiest", -"shined", -"shrewdness", -"significance", -"sitters", -"slakes", -"slogged", -"smoothest", -"snowfalls", -"solidifies", -"sow", -"speeches", -"spongiest", -"squalled", -"stammer", -"stealthy", -"stitches", -"strangers", -"stubbiest", -"subside", -"suitably", -"supplemented", -"swampiest", -"sympathetically", -"taken", -"tattled", -"temperate", -"testicle", -"thirteenths", -"tickles", -"tittered", -"tormentors", -"tragic", -"trappings", -"triggers", -"trusty", -"twigged", -"unburdening", -"undeserved", -"unite", -"unseemly", -"upstream", -"valved", -"verbiage", -"vindicating", -"vortexes", -"want", -"waxes", -"wets", -"whom", -"wipes", -"woolliest", -"wrinkles", -"zanier" - }; + return res; } -#endif /* DICT_H*/ \ No newline at end of file diff --git a/t/150-stamp_text.cpp b/t/150-stamp_text.cpp new file mode 100644 index 0000000..b1ae3d1 --- /dev/null +++ b/t/150-stamp_text.cpp @@ -0,0 +1,44 @@ +/****************************************************************************** + * + * Copyright 2021 Nikolay Shaplov (Postgres Professional) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +#include + +#include +#include +#include +#define WANT_TEST_EXTRAS +#include + +#include "blobstamper/stamp_text.h" + +using namespace TAP; + +int +main() +{ + TEST_START(1); + { /* 1..1 */ + char data[] = "папа\0мама\0бабушка\0дедушка\0братик\0сестричка"; + Blob blob(data, (sizeof data)-1); + StampTextSimple stamp; + std::string s = stamp.ExtractStr(blob); + is(s, "папа мама бабушка дедушка братик сестричка", "StampTextSimple"); + + } + TEST_END; +} From 6ed9745fe67bf252a6f027558f00be8664fc2bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Wed, 8 Feb 2023 08:57:49 +0000 Subject: [PATCH 4/7] fixed mestakes after rebase to master --- blobstamper/stamp_text.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blobstamper/stamp_text.h b/blobstamper/stamp_text.h index c4bef66..3eb8feb 100644 --- a/blobstamper/stamp_text.h +++ b/blobstamper/stamp_text.h @@ -26,7 +26,7 @@ #include #include -#include +#include "blobstamper/blobstamper.h" #include "blobstamper/dict.h" #include "blobstamper/stamp_dict.h" @@ -39,13 +39,13 @@ class StampTextSimple: public StampBaseStr std::string ExtractStr(Blob &blob) override; }; -class GalleyTextSimple: public GalleyVectorStrStamp +class GalleyTextSimple: public GalleyVectorStrStampBase { public: virtual std::string ExtractStr(Blob &blob) override; }; -class GalleyLCAlphaSmall: public GalleyVectorStrStamp +class GalleyLCAlphaSmall: public GalleyVectorStrStampBase { public: virtual std::string ExtractStr(Blob &blob) override; From 3a257f04a084bed50c6d740e2cdf616011ec5988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Fri, 10 Feb 2023 08:20:37 +0000 Subject: [PATCH 5/7] removed unnecessary #include in stamp_text.h --- blobstamper/stamp_text.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/blobstamper/stamp_text.h b/blobstamper/stamp_text.h index 3eb8feb..e079b89 100644 --- a/blobstamper/stamp_text.h +++ b/blobstamper/stamp_text.h @@ -20,16 +20,9 @@ #define STAMP_TEXT_H -#include -#include +#include "galley.h" -#include -#include - -#include "blobstamper/blobstamper.h" - -#include "blobstamper/dict.h" -#include "blobstamper/stamp_dict.h" +#include "stamp_dict.h" class StampTextSimple: public StampBaseStr { From 65abf659c4ef91b0d12bb2fde780faa1de5c3295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Fri, 10 Feb 2023 08:57:07 +0000 Subject: [PATCH 6/7] written tests for text stamps --- t/150-stamp_text.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/t/150-stamp_text.cpp b/t/150-stamp_text.cpp index b1ae3d1..e45c858 100644 --- a/t/150-stamp_text.cpp +++ b/t/150-stamp_text.cpp @@ -31,7 +31,7 @@ using namespace TAP; int main() { - TEST_START(1); + TEST_START(3); { /* 1..1 */ char data[] = "папа\0мама\0бабушка\0дедушка\0братик\0сестричка"; Blob blob(data, (sizeof data)-1); @@ -39,6 +39,22 @@ main() std::string s = stamp.ExtractStr(blob); is(s, "папа мама бабушка дедушка братик сестричка", "StampTextSimple"); + } + { /* 2..2 */ + char data[] = "dad\0mam\0granddad\0grandmam\0brother\0sister"; + Blob blob(data, (sizeof data)-1); + GalleyTextSimple stamp; + std::string s = stamp.ExtractStr(blob); + is(s, "d dad gra n dmam broth er siste", "GalleyTextSimple"); + + } + { /* 3..3 */ + char data[] = "abcdef" "abcdef" "ABCDEF" "012345"; + Blob blob(data, (sizeof data)-1); + GalleyLCAlphaSmall stamp; + std::string s = stamp.ExtractStr(blob); + is(s, "gleam godfather graffiti greened grouping gunshots gleam godfather graffiti greened grouping gunshots dismally dissented divested doorstep dread drunks convertors corpulent counterparts cranking crippled crusades", "GalleyLCAlphaSmall"); + } TEST_END; } From 605ed3623ba3f99f7244ecdfc3692a6e43cb2fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F?= Date: Fri, 10 Feb 2023 09:20:56 +0000 Subject: [PATCH 7/7] update stamp names --- blobstamper/stamp_text.cpp | 6 +++--- blobstamper/stamp_text.h | 6 +++--- t/150-stamp_text.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/blobstamper/stamp_text.cpp b/blobstamper/stamp_text.cpp index 2d2d87d..a7c1890 100644 --- a/blobstamper/stamp_text.cpp +++ b/blobstamper/stamp_text.cpp @@ -19,7 +19,7 @@ #include"stamp_text.h" std::string -StampTextSimple::ExtractStr(Blob &blob) +StampTextPulp::ExtractStr(Blob &blob) { std::vector data = blob.ChopBlank(*this); @@ -37,7 +37,7 @@ StampTextSimple::ExtractStr(Blob &blob) return res; } -std::string GalleyTextSimple::ExtractStr(Blob &blob) +std::string StampTextPulpWords::ExtractStr(Blob &blob) { std::vector data = ExtractStrVector(blob); std::string res = ""; @@ -53,7 +53,7 @@ std::string GalleyTextSimple::ExtractStr(Blob &blob) return res; } -std::string GalleyLCAlphaSmall::ExtractStr(Blob &blob) +std::string StampTextDictWords::ExtractStr(Blob &blob) { std::vector data = ExtractStrVector(blob); std::string res = ""; diff --git a/blobstamper/stamp_text.h b/blobstamper/stamp_text.h index e079b89..7651fb8 100644 --- a/blobstamper/stamp_text.h +++ b/blobstamper/stamp_text.h @@ -24,7 +24,7 @@ #include "stamp_dict.h" -class StampTextSimple: public StampBaseStr +class StampTextPulp: public StampBaseStr { public: virtual int minSize() override {return 1;} @@ -32,13 +32,13 @@ class StampTextSimple: public StampBaseStr std::string ExtractStr(Blob &blob) override; }; -class GalleyTextSimple: public GalleyVectorStrStampBase +class StampTextPulpWords: public GalleyVectorStrStampBase { public: virtual std::string ExtractStr(Blob &blob) override; }; -class GalleyLCAlphaSmall: public GalleyVectorStrStampBase +class StampTextDictWords: public GalleyVectorStrStampBase { public: virtual std::string ExtractStr(Blob &blob) override; diff --git a/t/150-stamp_text.cpp b/t/150-stamp_text.cpp index e45c858..53cadc9 100644 --- a/t/150-stamp_text.cpp +++ b/t/150-stamp_text.cpp @@ -35,7 +35,7 @@ main() { /* 1..1 */ char data[] = "папа\0мама\0бабушка\0дедушка\0братик\0сестричка"; Blob blob(data, (sizeof data)-1); - StampTextSimple stamp; + StampTextPulp stamp; std::string s = stamp.ExtractStr(blob); is(s, "папа мама бабушка дедушка братик сестричка", "StampTextSimple"); @@ -43,7 +43,7 @@ main() { /* 2..2 */ char data[] = "dad\0mam\0granddad\0grandmam\0brother\0sister"; Blob blob(data, (sizeof data)-1); - GalleyTextSimple stamp; + StampTextPulpWords stamp; std::string s = stamp.ExtractStr(blob); is(s, "d dad gra n dmam broth er siste", "GalleyTextSimple"); @@ -51,7 +51,7 @@ main() { /* 3..3 */ char data[] = "abcdef" "abcdef" "ABCDEF" "012345"; Blob blob(data, (sizeof data)-1); - GalleyLCAlphaSmall stamp; + StampTextDictWords stamp; std::string s = stamp.ExtractStr(blob); is(s, "gleam godfather graffiti greened grouping gunshots gleam godfather graffiti greened grouping gunshots dismally dissented divested doorstep dread drunks convertors corpulent counterparts cranking crippled crusades", "GalleyLCAlphaSmall");