Can parameters limitPatternLength and limitLiteralCount be increased?
- Dominant language
- C++
- Stars
- 5.5k
- Forks
- 816
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 2
Description
i prepare to use hyperscan to match patterns like:
1) .*abc{dict1}abc
2) .*123{dict2}123
dict1 and dict2 are big string set (stored in file), like:
dict1:
jack
rose
mike
...
dict2:
tom
jerry
lily
...
i transform my patterns by expanding strings of dict as:
1) .*abc(jack|rose|mike|...)abc
2) .*123(tom|jerry|lily)123
because dict1 and dict2 is so large (>20MB)
so transformed pattern is too large, so hyperscan raise error:
"Pattern length exceeds limit"
beloved source code is :
https://github.com/intel/hyperscan/blob/master/src/hs.cpp#L538
https://github.com/intel/hyperscan/blob/master/src/grey.cpp#L148
so can parameters limitPatternLength and limitLiteralCount be increased to match a large pattern with a dict?
Contributor guide
Assessment
This issue has not been assessed yet.