grep -f的性能问题

时间:2017-06-27 11:05:18

标签: regex performance grep

我正在使用grep在单个文件中搜索多个正则表达式。 特别是,我正在考虑a 100 MB file with English subtitles并运行存储在文件 patterns.txt 中的以下正则表达式:

Cas.*eharden
acr.*otic
syn.*thesizing
sub.*abbot
iss.*acharite
bot.*onne
dis.*similatory
ove.*rmantel
isa.*tin
ado.*nijah
sol.*ution
zei.*st
fam.*ousness
inq.*uisitress
aor.*tography
via.*duct
ama.*sa
der.*ive
pie.*tas
kit.*chenette

在这样做的过程中,我发现grep所需的时间与正则表达式的数量并不成线性增长。实际上,似乎以指数方式增长

实验

系统:Intel(R)Core(TM)i5-5200U CPU @ 2.20GHz; 4个核心; 8 GB RAM

案例1:20个正则表达式

命令grep -c -f patterns.txt subtitles.txt计算2214次出现并取 2,19s用户0,00s系统99%cpu 2,192总。

案例2:30 regexps

如果我将以下表达式添加到 patterns.txt

ort.*hros
ove.*ridentify
mis.*tiest
pay.*ne
int.*erchasing
jej.*uneness
sta.*lactiform
und.*ertrain
cob.*bles
Sub.*category

命令grep -c -f patterns.txt subtitles.txt计数2894次,占用71,35s用户0,06s系统99%cpu 1:11,42次。

案例3:35 regexps

再添加五个表达式:

dis.*embosom
imp.*ortunateness
ema.*thion
rho.*mb
haz.*elwood

命令grep -c -f patterns.txt subtitles.txt计算2904次出现并占用211,18s用户0,22s系统99%cpu 3:31,58总计

为什么grep -f表现出这样的行为?它在内部做什么?

我一直在使用的整套正则表达式here

2 个答案:

答案 0 :(得分:3)

通过阅读grep源代码,您的文件中的正则表达式似乎不会一次执行一次。相反,他们会立刻读到一个大的正则表达式:

case 'f':
  fp = STREQ (optarg, "-") ? stdin : fopen (optarg, O_TEXT ? "rt" : "r");
  if (!fp)
    error (EXIT_TROUBLE, errno, "%s", optarg);
  for (keyalloc = 1; keyalloc <= keycc + 1; keyalloc *= 2)
    ;
  keys = xrealloc (keys, keyalloc);
  oldcc = keycc;
  while ((cc = fread (keys + keycc, 1, keyalloc - 1 - keycc, fp)) != 0)
    {
      keycc += cc;
      if (keycc == keyalloc - 1)
        keys = x2nrealloc (keys, &keyalloc, sizeof *keys);
    }

确认在您的命令上观看strace grep运行:

open("testreg", O_RDONLY)               = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=124, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd8912fe000
read(3, "ort.*hros\nove.*ridentify\nmis.*ti"..., 4096) = 124

回溯正则表达式实现(允许反向引用),不在O(n)时间运行,而是在O(2 ^ m)运行,这可能导致catastrophic运行时。

您假设grep依次循环遍历每个正则表达式,将每个正则表达式编译为DFA然后执行它是完全合理的。但是,似乎grep作者假设通过同时运行正则表达式,他们可能会在某些情况下更有效地执行此操作。结果是,通过将正则表达式添加到您的文件中,您将进入O(2 ^ m)运行时,从而导致运行时呈指数级增长。

事实证明,简单地循环遍历执行它们的每个正则表达式可能会更有效,从而迫使grep线性运行。在我的笔记本电脑上,运行grep版本2.20,我只使用你提供的文件中的最后29个正则表达式得到以下结果:

[Downloads]$ wc -l patterns.txt 
29 patterns.txt

[Downloads]$ time grep -c -f ~/Downloads/patterns.txt /usr/share/dict/linux.words 
117

real    0m3.092s
user    0m3.027s
sys     0m0.047s

[csd@alcazar Downloads]$ time for regex in `cat ~/Downloads/patterns.txt`; do grep -c $regex /usr/share/dict/linux.words > /dev/null; done
real    0m0.474s
user    0m0.312s
sys     0m0.158s

答案 1 :(得分:1)

我有点晚了,但想试着澄清问题所在 首先,.* 永远不会跨越换行符,永远!

在门外,你不应该使用单独的正则扫描扫描
相同的目标文本区域(完全独立的主题)。

好的,所以在这一点上,我们可以做到可行的事情。

我们可以在构建和组合正则表达式时做出选择 我们可以确保每一个都是单独的交替 但是,如果我们有一个数量的 literal 正则表达式,那么这将是 引起问题。

考虑一个由大多数字母数字字符组成的正则表达式 trie 在外部交替级别,我们只想给发动机一个最大值 发动机横穿的26条通道 当我们进入二级(在每条路径内)时,我们想要给予 引擎另外26个最大路径 对于那些途径,每个儿童途径等,这种选择再次发生......

这是一个完整的多级正则表达式 trie 的定义。
这大大减少了匹配的步骤的数量,我将在下面显示。

我已经拍摄了你的patterns.txt并制作了两种表达方式 一个没有一个特里,一个与。

我们将合并580个单独的模式 在没有特里结构的那个中,有580个外层通道 在具有特里的那个中,它形成了25个路径 仅仅这一点就代表了20到1的速度差异。

继续前进,我们进一步为每个级别创建所有子路径trie 这样可以在另外10-30倍的时间内完成这项工作。

你的模式大多是统一的,因为它们每个都有3个字母常数
在贪婪量词之前.* 在此之后,仍然构建了子系统,但此时属于
轻微的影响。

我已使用名为
RegexFormat 8 实用程序 Strings to Regex - Ternary Tree 生成完整的 trie&#39> 来自字符串文字。

我将这个生成的正则表达式与未改变的模式列表进行比较 正则表达式,我在其中加入了每个正则表达式之间的交替。

对于测试样本,我使用了你的一半 100 MB file with English subtitles
大约50 MB 测试是使用RegexFormat 8进行的,内置 Benchmark Utility

Regex1是完整的生成线索 Regex2是非trie版本。

每个正则表达式在50MB目标中匹配36,776个项目 然而,时代却截然不同。

结果:

Regex1:   (?:A(?:gr.*iology|nk.*let|tt.*ributive)|Bow.*ls|Cas.*eharden|Iso.*propyl|L(?:ab.*ella|ic.*htenberg)|Neu.*stic|Oro.*nasally|Pen.*stemon|R(?:e(?:i.*nspiration|p.*rovable)|up.*ee)|S(?:hi.*gellae|te.*rlet|ub.*(?:category|epithelial))|Vit.*alian|Wer.*e|a(?:c(?:a.*demic|e.*t(?:aldol|ylation)|h.*enial|i.*dimeter|r.*otic)|d(?:e.*nosarcomata|m.*easurer|o.*nijah)|ec.*ium|ir.*less|l(?:e.*xandroupolis|k.*alisation|l.*owable|m.*swomen)|m(?:a.*sa|n.*esic|y.*xorrhea)|n(?:c.*one|e.*mogram|g.*elical|o.*(?:ciassociation|le)|t.*imechanistic)|or.*tography|p(?:i.*sh|o.*carpous|ï.*¿¥ï¾½ritif)|r(?:c.*hipelagic|m.*ored|n.*oldson|y.*balloid)|s(?:c.*endent|t.*ound)|tt.*ainder|u(?:d.*ience|s.*tralioid|t.*ostoper)|va.*re|zi.*muthal)|b(?:a(?:b.*ette|l.*let|n.*galay|r.*(?:a|racuda|tolozzi))|e(?:a.*dsman|r.*(?:dache|nardsville))|is.*ymmetrically|la.*ckbuck|o(?:b.*owler|g.*(?:hazk¥ᄀy|omilism)|o.*mingly|r.*onic|t.*onne|u.*rbonnais)|r(?:i.*olette|o.*(?:minate|wne)|y.*ophytic)|ui.*ldup)|c(?:a(?:j.*ole|r.*teret|s.*sie|t.*(?:awba|hexes))|e(?:n.*(?:serless|tralist)|r.*(?:emoniously|tify))|h(?:a.*nduy|l.*orohydrin|o.*ya|r.*omoplast)|li.*(?:ckless|ntonville|toridean)|o(?:b.*bles|c.*kaded|g.*itable|h.*esiveness|l.*(?:lectivise|onially|umba)|n.*(?:gregativeness|strictive|tortion|vulsive)|r.*deliers|ï.*¿¥ï¾¡peratively)|r(?:a.*ckers|c.*hes|e.*stline|o.*(?:akier|uton))|u(?:l.*turist|r.*bless)|ï¿.*¥ï¾½dula)|d(?:''.*s|a(?:m.*selfishes|n.*dier)|e(?:a.*minize|f.*enseless|h.*umanize|m.*ulsifying|r.*(?:ive|mabrasion)|s.*(?:de|iderative)|v.*(?:a|olatilizing))|i(?:a.*dochy|h.*ydromorphinone|p.*lomatical|s.*(?:e(?:mbosom|nfranchisement|stablish)|similatory|tinguished|yllabize)|v.*ulgement)|o(?:l.*phinfishes|o.*rstep|r.*ter)|r(?:a.*(?:gonhead|maturge)|e.*ssing|u.*dging)|ul.*cimer)|e(?:as.*iness|co.*nometrician|ff.*ortful|l(?:e.*git|o.*ign)|m(?:a.*thion|e.*ndatory)|pi.*zoite|qu.*ipoise|st.*afette|th.*(?:nolinguistics|yl(?:ated|dichloroarsine))|x(?:c.*uss|h.*umed|p.*(?:andible|iable|ostulation)|t.*ravasating)|yc.*k)|f(?:a(?:m.*ousness|n.*tasied)|e(?:l.*ony|r.*(?:rotype|vidly)|w.*er)|i(?:l.*ial|s.*her)|l(?:a.*m(?:b¥ᄑ|eproof)|e.*et)|o(?:r.*(?:dyce|mularize)|z.*iness)|re.*ak|u(?:n.*goid|r.*ry))|g(?:a(?:l.*(?:act(?:in|oid)|vanically|way)|s.*(?:ifier|trostomy)|u.*(?:l|ssmeter))|e(?:g.*enion|n.*(?:eseo|ista)|o.*phyte|s.*tative)|in.*gili|lo.*(?:be|ssary)|o(?:d.*(?:hood|liest)|l.*dberg)|r(?:a.*(?:n(?:ddaddy|ulating)|vimetry)|e.*endale)|ua.*iacum|wy.*dion)|h(?:a(?:l.*lmark|r.*d(?:handed|ly)|s.*tefully|t.*shepset|z.*elwood)|e(?:a.*rt(?:eningly|sick)|c.*tometre|m.*atoid|p.*tode|t.*erodactyl|u.*neburg)|id.*eout|o(?:n.*orius|p.*s|r.*(?:nbeam|ribly)|v.*elled)|u(?:n.*k|r.*ricane)|y(?:o.*scine|p.*othallus))|i(?:d(?:e.*ler|m.*on)|ll.*iquidly|m(?:m.*obilize|p.*(?:ort(?:antly|unateness)|udently))|n(?:a.*dequacy|c.*linable|d.*ustrialised|e.*quitable|f.*ringer|g.*rate|q.*uisitress|t.*(?:er(?:aural|belligerent|chasing|hybridized|mundane)|ranuclear))|od.*ise|r(?:e.*nical|k.*someness|r.*uptively)|s(?:a.*tin|s.*acharite))|j(?:a(?:i.*na|m.*aican)|e(?:a.*n|d.*burgh|j.*uneness|w.*ishness)|id.*da|ud.*ea)|k(?:am.*seen|ea.*nsburg|i(?:l.*obaud|t.*chenette)|la.*nism|on.*a|uw.*ait)|l(?:ac.*unaria|i(?:e.*der|m.*acine|n.*us|q.*uer|s.*tlessly)|o(?:c.*k|g.*(?:iciz(?:e|ing)|ographer))|u(?:k.*s|m.*inal)|ym.*phogranulomata)|m(?:a(?:m.*al(?:lapuram|uke)|r.*(?:acanda|or)|s.*sys)|ca.*llen|e(?:i.*lhac|t.*hylate)|i(?:n.*imalist|s.*(?:a(?:nalyzing|uthorizing)|ce|quoting|shipping|tiest)|t.*tatur)|on.*othelitic|u(?:l.*ti(?:chrome|volumed)|s.*siest))|n(?:at.*atoriums|e(?:c.*rologically|m.*o|o.*styled|p.*hritic|t.*tlelike|u.*roglial|w.*fangledly)|o(?:g.*gin|n.*(?:a(?:mendment|scetic|ttachment)|dilution|knowledgeable|narrative|receptive|s(?:a(?:cramental|linity)|ecrecy|tability|uspended))|r.*mandy|u.*akchott)|ur.*turable)|o(?:li.*o|p(?:e.*nairness|h.*thalmoscopy|s.*onin)|r(?:a.*cles|i.*entally|o.*logist|t.*hros)|sc.*illator|u(?:s.*el|t.*(?:chasing|drew|echoing))|ve.*r(?:glad|hang|i(?:dentify|mpressibility|ntensified)|m(?:antel|uch)|spacious|thriftiness)|wl.*ishness|xy.*genicity)|p(?:a(?:r.*(?:a(?:professional|tences)|entalia)|y.*ne)|e(?:d.*al|e.*p|n.*(?:etrableness|u(?:mbra|rious))|r.*(?:ches|istaltically))|h(?:i.*landerer|o.*(?:nautograph|to(?:n|static)))|i(?:c.*nicking|e.*tas|n.*gr|p.*pin)|la.*yday|ne.*umoencephalogram|o(?:o.*fter|p.*sy)|r(?:e.*(?:a(?:cceptance|ffiliated|ging)|con(?:flict|triving)|d(?:eprive|is(?:ciplined|guise))|expeditionary|historically|insult|judger|pense|s(?:entimental|u(?:bscription|itable))|t(?:ry|ypify))|o.*(?:fligateness|mulger|t(?:eid|oplasmic)))|se.*udo(?:cele|nymous)|u(?:b.*licized|i.*rness|n.*ctualness|r.*sing|t.*rilaginous)|yx.*is)|qu(?:a.*rreler|i.*st|o.*dlibetically)|r(?:a(?:d.*iotelemetry|g.*gedy)|e(?:c.*(?:ampaign|umbent)|d.*ominating|e.*xpose|f.*ulgentness|i.*(?:maged|nhardt|temized)|m.*ontoire|o.*rientating|p.*(?:e(?:llant|n)|lunging)|s.*hook|t.*(?:elegraph|ral)|v.*ocableness)|h(?:i.*naria|o.*mb)|i(?:d.*dle|f.*leman)|o(?:d.*eo|l.*lo|u.*che|y.*ce))|s(?:a(?:l.*ic|n.*(?:ctimonious|d))|c(?:e.*ptic|o.*ttish|r.*u(?:ffiest|mpy)|u.*lptor)|e(?:l.*ves|p.*arator)|h(?:e.*lbyville|i.*pboard|o.*shone)|in.*(?:cerely|gularise)|lo.*wpoke|m(?:i.*dgin|o.*keproof)|o(?:l.*ution|p.*rano|r.*(?:bian|rento)|u.*thwest)|p(?:a.*lato|i.*nning|r.*itehood)|t(?:a.*(?:lactiform|minodia|ndish|toblast)|e.*rope|i.*lyaga)|u(?:b.*(?:abbot|extensible|foliation|jectional|preceptorial|stantialness|tegumental)|k.*arnapura|l.*liable|n.*ward|p.*eracquisition)|wi.*m|yn.*thesizing)|t(?:a(?:l.*kie|t.*tooed)|e(?:l.*e(?:cast|g|ran)|n.*sionless|r.*minatory|t.*radrachm)|h(?:e.*(?:ban|r(?:m(?:alize|obarograph)|ophyte)|spian)|i.*osinamine)|ig.*r¥ᄑ|o(?:n.*eless|r.*ulosis)|ra.*(?:lles|pani)|u(?:m.*idity|n.*eableness)|w(?:e.*enies|o.*three)|y(?:l.*er|p.*ewrote))|u(?:lt.*raviruses|n(?:b.*(?:esmirched|oring)|c.*o(?:mmitted|n(?:fronted|tr(?:asted|ibutory)))|d.*(?:e(?:based|r(?:framework|nourish|populated|train))|ischarged|rowned)|e.*xceeded|f.*orgeability|g.*(?:oaded|roupable)|l.*oyalty|m.*ounting|o.*ceanic|p.*(?:erishing|hlegmatic|recocious)|r.*e(?:ached|counted|solvable)|s.*(?:e(?:parative|rrate)|hadowable|ilicified|l(?:immed|uiced)|naky|pelt|t(?:ealthy|oppably)|werving)|t.*(?:heistical|r(?:ansparent|ustworthy))|u.*seful|w.*hisked)|p(?:b.*ear|p.*ercutting)|rs.*ula)|v(?:a(?:l.*ois|p.*orize|r.*as|t.*ican)|er.*us|i(?:a.*duct|c.*tualing|l.*lose)|ul.*canizer)|w(?:a(?:r.*rington|x.*y)|e(?:a.*rability|s.*termarck)|he.*rrit|i(?:s.*teria|t.*hy)|ul.*fenite)|y(?:es.*enin|ol.*ande)|z(?:e(?:b.*ec|i.*st|l.*os)|on.*ule))
Options:  < none >
Completed iterations:   1  /  1     ( x 1 )
Matches found per iteration:   36776
Elapsed Time:    19.94 s,   19936.96 ms,   19936963 µs


Regex2:   (?:Cas.*eharden|acr.*otic|... (truncated)
Options:  < none >
Completed iterations:   1  /  1     ( x 1 )
Matches found per iteration:   36776
Elapsed Time:    299.74 s,   299735.86 ms,   299735857 µs

格式化(扩展)时可以更好地看到正则表达式。

结论 - 我建议使用完整的 trie 来治愈你的身体 延迟问题。

祝你好运!!
如果您有任何问题随时问。

(?:
    A
    (?:
        gr .* iology
      | nk .* let
      | tt .* ributive 
    )
  | Bow .* ls
  | Cas .* eharden
  | Iso .* propyl
  | L
    (?: ab .* ella | ic .* htenberg )
  | Neu .* stic
  | Oro .* nasally
  | Pen .* stemon
  | R
    (?:
        e
        (?: i .* nspiration | p .* rovable )
      | up .* ee
    )
  | S
    (?:
        hi .* gellae
      | te .* rlet
      | ub .* 
        (?: category | epithelial )
    )
  | Vit .* alian
  | Wer .* e
  | a
    (?:
        c
        (?:
            a .* demic
          | e .* t
            (?: aldol | ylation )
          | h .* enial
          | i .* dimeter
          | r .* otic
        )
      | d
        (?:
            e .* nosarcomata
          | m .* easurer
          | o .* nijah
        )
      | ec .* ium
      | ir .* less
      | l
        (?:
            e .* xandroupolis
          | k .* alisation
          | l .* owable
          | m .* swomen
        )
      | m
        (?: a .* sa | n .* esic | y .* xorrhea )
      | n
        (?:
            c .* one
          | e .* mogram
          | g .* elical
          | o .* 
            (?: ciassociation | le )
          | t .* imechanistic
        )
      | or .* tography
      | p
        (?:
            i .* sh
          | o .* carpous
          | ï .* ¿¥ï¾½ritif 
        )
      | r
        (?:
            c .* hipelagic
          | m .* ored
          | n .* oldson
          | y .* balloid
        )
      | s
        (?: c .* endent | t .* ound )
      | tt .* ainder
      | u
        (?:
            d .* ience
          | s .* tralioid
          | t .* ostoper 
        )
      | va .* re
      | zi .* muthal
    )
  | b
    (?:
        a
        (?:
            b .* ette
          | l .* let
          | n .* galay
          | r .* 
            (?: a | racuda | tolozzi )
        )
      | e
        (?:
            a .* dsman
          | r .* 
            (?: dache | nardsville )
        )
      | is .* ymmetrically
      | la .* ckbuck
      | o
        (?:
            b .* owler
          | g .* 
            (?: hazk¥ᄀy | omilism )
          | o .* mingly
          | r .* onic
          | t .* onne
          | u .* rbonnais
        )
      | r
        (?:
            i .* olette
          | o .* 
            (?: minate | wne )
          | y .* ophytic
        )
      | ui .* ldup
    )
  | c
    (?:
        a
        (?:
            j .* ole
          | r .* teret
          | s .* sie
          | t .* 
            (?: awba | hexes )
        )
      | e
        (?:
            n .* 
            (?: serless | tralist )
          | r .* 
            (?: emoniously | tify )
        )
      | h
        (?:
            a .* nduy
          | l .* orohydrin
          | o .* ya
          | r .* omoplast
        )
      | li .* 
        (?: ckless | ntonville | toridean )
      | o
        (?:
            b .* bles
          | c .* kaded
          | g .* itable
          | h .* esiveness
          | l .* 
            (?: lectivise | onially | umba )
          | n .* 
            (?:
                gregativeness
              | strictive
              | tortion
              | vulsive 
            )
          | r .* deliers
          | ï .* ¿¥ï¾¡peratively
        )
      | r
        (?:
            a .* ckers
          | c .* hes
          | e .* stline
          | o .* 
            (?: akier | uton )
        )
      | u
        (?: l .* turist | r .* bless )
      | ï¿ .* ¥ï¾½dula
    )
  | d
    (?:
        '' .* s
      | a
        (?: m .* selfishes | n .* dier )
      | e
        (?:
            a .* minize
          | f .* enseless
          | h .* umanize
          | m .* ulsifying
          | r .* 
            (?: ive | mabrasion )
          | s .* 
            (?: de | iderative )
          | v .* 
            (?: a | olatilizing )
        )
      | i
        (?:
            a .* dochy
          | h .* ydromorphinone
          | p .* lomatical
          | s .* 
            (?:
                e
                (?: mbosom | nfranchisement | stablish )
              | similatory
              | tinguished
              | yllabize
            )
          | v .* ulgement
        )
      | o
        (?:
            l .* phinfishes
          | o .* rstep
          | r .* ter 
        )
      | r
        (?:
            a .* 
            (?: gonhead | maturge )
          | e .* ssing
          | u .* dging
        )
      | ul .* cimer
    )
  | e
    (?:
        as .* iness
      | co .* nometrician
      | ff .* ortful
      | l
        (?: e .* git | o .* ign )
      | m
        (?: a .* thion | e .* ndatory )
      | pi .* zoite
      | qu .* ipoise
      | st .* afette
      | th .* 
        (?:
            nolinguistics
          | yl
            (?: ated | dichloroarsine )
        )
      | x
        (?:
            c .* uss
          | h .* umed
          | p .* 
            (?: andible | iable | ostulation )
          | t .* ravasating
        )
      | yc .* k
    )
  | f
    (?:
        a
        (?: m .* ousness | n .* tasied )
      | e
        (?:
            l .* ony
          | r .* 
            (?: rotype | vidly )
          | w .* er
        )
      | i
        (?: l .* ial | s .* her )
      | l
        (?:
            a .* m
            (?: b¥ᄑ | eproof )
          | e .* et
        )
      | o
        (?:
            r .* 
            (?: dyce | mularize )
          | z .* iness
        )
      | re .* ak
      | u
        (?: n .* goid | r .* ry )
    )
  | g
    (?:
        a
        (?:
            l .* 
            (?:
                act
                (?: in | oid )
              | vanically
              | way
            )
          | s .* 
            (?: ifier | trostomy )
          | u .* 
            (?: l | ssmeter )
        )
      | e
        (?:
            g .* enion
          | n .* 
            (?: eseo | ista )
          | o .* phyte
          | s .* tative
        )
      | in .* gili
      | lo .* 
        (?: be | ssary )
      | o
        (?:
            d .* 
            (?: hood | liest )
          | l .* dberg
        )
      | r
        (?:
            a .* 
            (?:
                n
                (?: ddaddy | ulating )
              | vimetry
            )
          | e .* endale
        )
      | ua .* iacum
      | wy .* dion
    )
  | h
    (?:
        a
        (?:
            l .* lmark
          | r .* d
            (?: handed | ly )
          | s .* tefully
          | t .* shepset
          | z .* elwood
        )
      | e
        (?:
            a .* rt
            (?: eningly | sick )
          | c .* tometre
          | m .* atoid
          | p .* tode
          | t .* erodactyl
          | u .* neburg
        )
      | id .* eout
      | o
        (?:
            n .* orius
          | p .* s
          | r .* 
            (?: nbeam | ribly )
          | v .* elled
        )
      | u
        (?: n .* k | r .* ricane )
      | y
        (?: o .* scine | p .* othallus )
    )
  | i
    (?:
        d
        (?: e .* ler | m .* on )
      | ll .* iquidly
      | m
        (?:
            m .* obilize
          | p .* 
            (?:
                ort
                (?: antly | unateness )
              | udently
            )
        )
      | n
        (?:
            a .* dequacy
          | c .* linable
          | d .* ustrialised
          | e .* quitable
          | f .* ringer
          | g .* rate
          | q .* uisitress
          | t .* 
            (?:
                er
                (?:
                    aural
                  | belligerent
                  | chasing
                  | hybridized
                  | mundane
                )
              | ranuclear
            )
        )
      | od .* ise
      | r
        (?:
            e .* nical
          | k .* someness
          | r .* uptively 
        )
      | s
        (?: a .* tin | s .* acharite )
    )
  | j
    (?:
        a
        (?: i .* na | m .* aican )
      | e
        (?:
            a .* n
          | d .* burgh
          | j .* uneness
          | w .* ishness
        )
      | id .* da
      | ud .* ea
    )
  | k
    (?:
        am .* seen
      | ea .* nsburg
      | i
        (?: l .* obaud | t .* chenette )
      | la .* nism
      | on .* a
      | uw .* ait
    )
  | l
    (?:
        ac .* unaria
      | i
        (?:
            e .* der
          | m .* acine
          | n .* us
          | q .* uer
          | s .* tlessly
        )
      | o
        (?:
            c .* k
          | g .* 
            (?:
                iciz
                (?: e | ing )
              | ographer
            )
        )
      | u
        (?: k .* s | m .* inal )
      | ym .* phogranulomata
    )
  | m
    (?:
        a
        (?:
            m .* al
            (?: lapuram | uke )
          | r .* 
            (?: acanda | or )
          | s .* sys
        )
      | ca .* llen
      | e
        (?: i .* lhac | t .* hylate )
      | i
        (?:
            n .* imalist
          | s .* 
            (?:
                a
                (?: nalyzing | uthorizing )
              | ce
              | quoting
              | shipping
              | tiest
            )
          | t .* tatur
        )
      | on .* othelitic
      | u
        (?:
            l .* ti
            (?: chrome | volumed )
          | s .* siest
        )
    )
  | n
    (?:
        at .* atoriums
      | e
        (?:
            c .* rologically
          | m .* o
          | o .* styled
          | p .* hritic
          | t .* tlelike
          | u .* roglial
          | w .* fangledly
        )
      | o
        (?:
            g .* gin
          | n .* 
            (?:
                a
                (?: mendment | scetic | ttachment )
              | dilution
              | knowledgeable
              | narrative
              | receptive
              | s
                (?:
                    a
                    (?: cramental | linity )
                  | ecrecy
                  | tability
                  | uspended
                )
            )
          | r .* mandy
          | u .* akchott
        )
      | ur .* turable
    )
  | o
    (?:
        li .* o
      | p
        (?:
            e .* nairness
          | h .* thalmoscopy
          | s .* onin
        )
      | r
        (?:
            a .* cles
          | i .* entally
          | o .* logist
          | t .* hros
        )
      | sc .* illator
      | u
        (?:
            s .* el
          | t .* 
            (?: chasing | drew | echoing )
        )
      | ve .* r
        (?:
            glad
          | hang
          | i
            (?: dentify | mpressibility | ntensified )
          | m
            (?: antel | uch )
          | spacious
          | thriftiness
        )
      | wl .* ishness
      | xy .* genicity
    )
  | p
    (?:
        a
        (?:
            r .* 
            (?:
                a
                (?: professional | tences )
              | entalia
            )
          | y .* ne
        )
      | e
        (?:
            d .* al
          | e .* p
          | n .* 
            (?:
                etrableness
              | u
                (?: mbra | rious )
            )
          | r .* 
            (?: ches | istaltically )
        )
      | h
        (?:
            i .* landerer
          | o .* 
            (?:
                nautograph
              | to
                (?: n | static )
            )
        )
      | i
        (?:
            c .* nicking
          | e .* tas
          | n .* gr
          | p .* pin 
        )
      | la .* yday
      | ne .* umoencephalogram
      | o
        (?: o .* fter | p .* sy )
      | r
        (?:
            e .* 
            (?:
                a
                (?: cceptance | ffiliated | ging )
              | con
                (?: flict | triving )
              | d
                (?:
                    eprive
                  | is
                    (?: ciplined | guise )
                )
              | expeditionary
              | historically
              | insult
              | judger
              | pense
              | s
                (?:
                    entimental
                  | u
                    (?: bscription | itable )
                )
              | t
                (?: ry | ypify )
            )
          | o .* 
            (?:
                fligateness
              | mulger
              | t
                (?: eid | oplasmic )
            )
        )
      | se .* udo
        (?: cele | nymous )
      | u
        (?:
            b .* licized
          | i .* rness
          | n .* ctualness
          | r .* sing
          | t .* rilaginous
        )
      | yx .* is
    )
  | qu
    (?:
        a .* rreler
      | i .* st
      | o .* dlibetically 
    )
  | r
    (?:
        a
        (?: d .* iotelemetry | g .* gedy )
      | e
        (?:
            c .* 
            (?: ampaign | umbent )
          | d .* ominating
          | e .* xpose
          | f .* ulgentness
          | i .* 
            (?: maged | nhardt | temized )
          | m .* ontoire
          | o .* rientating
          | p .* 
            (?:
                e
                (?: llant | n )
              | lunging
            )
          | s .* hook
          | t .* 
            (?: elegraph | ral )
          | v .* ocableness
        )
      | h
        (?: i .* naria | o .* mb )
      | i
        (?: d .* dle | f .* leman )
      | o
        (?:
            d .* eo
          | l .* lo
          | u .* che
          | y .* ce 
        )
    )
  | s
    (?:
        a
        (?:
            l .* ic
          | n .* 
            (?: ctimonious | d )
        )
      | c
        (?:
            e .* ptic
          | o .* ttish
          | r .* u
            (?: ffiest | mpy )
          | u .* lptor
        )
      | e
        (?: l .* ves | p .* arator )
      | h
        (?:
            e .* lbyville
          | i .* pboard
          | o .* shone 
        )
      | in .* 
        (?: cerely | gularise )
      | lo .* wpoke
      | m
        (?: i .* dgin | o .* keproof )
      | o
        (?:
            l .* ution
          | p .* rano
          | r .* 
            (?: bian | rento )
          | u .* thwest
        )
      | p
        (?: a .* lato | i .* nning | r .* itehood )
      | t
        (?:
            a .* 
            (?: lactiform | minodia | ndish | toblast )
          | e .* rope
          | i .* lyaga
        )
      | u
        (?:
            b .* 
            (?:
                abbot
              | extensible
              | foliation
              | jectional
              | preceptorial
              | stantialness
              | tegumental
            )
          | k .* arnapura
          | l .* liable
          | n .* ward
          | p .* eracquisition
        )
      | wi .* m
      | yn .* thesizing
    )
  | t
    (?:
        a
        (?: l .* kie | t .* tooed )
      | e
        (?:
            l .* e
            (?: cast | g | ran )
          | n .* sionless
          | r .* minatory
          | t .* radrachm
        )
      | h
        (?:
            e .* 
            (?:
                ban
              | r
                (?:
                    m
                    (?: alize | obarograph )
                  | ophyte
                )
              | spian
            )
          | i .* osinamine
        )
      | ig .* r¥ᄑ
      | o
        (?: n .* eless | r .* ulosis )
      | ra .* 
        (?: lles | pani )
      | u
        (?: m .* idity | n .* eableness )
      | w
        (?: e .* enies | o .* three )
      | y
        (?: l .* er | p .* ewrote )
    )
  | u
    (?:
        lt .* raviruses
      | n
        (?:
            b .* 
            (?: esmirched | oring )
          | c .* o
            (?:
                mmitted
              | n
                (?:
                    fronted
                  | tr
                    (?: asted | ibutory )
                )
            )
          | d .* 
            (?:
                e
                (?:
                    based
                  | r
                    (?:
                        framework
                      | nourish
                      | populated
                      | train 
                    )
                )
              | ischarged
              | rowned
            )
          | e .* xceeded
          | f .* orgeability
          | g .* 
            (?: oaded | roupable )
          | l .* oyalty
          | m .* ounting
          | o .* ceanic
          | p .* 
            (?: erishing | hlegmatic | recocious )
          | r .* e
            (?: ached | counted | solvable )
          | s .* 
            (?:
                e
                (?: parative | rrate )
              | hadowable
              | ilicified
              | l
                (?: immed | uiced )
              | naky
              | pelt
              | t
                (?: ealthy | oppably )
              | werving
            )
          | t .* 
            (?:
                heistical
              | r
                (?: ansparent | ustworthy )
            )
          | u .* seful
          | w .* hisked
        )
      | p
        (?: b .* ear | p .* ercutting )
      | rs .* ula
    )
  | v
    (?:
        a
        (?:
            l .* ois
          | p .* orize
          | r .* as
          | t .* ican 
        )
      | er .* us
      | i
        (?: a .* duct | c .* tualing | l .* lose )
      | ul .* canizer
    )
  | w
    (?:
        a
        (?: r .* rington | x .* y )
      | e
        (?: a .* rability | s .* termarck )
      | he .* rrit
      | i
        (?: s .* teria | t .* hy )
      | ul .* fenite
    )
  | y
    (?: es .* enin | ol .* ande )
  | z
    (?:
        e
        (?: b .* ec | i .* st | l .* os )
      | on .* ule
    )
)