Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ermanh authored Jun 24, 2020
1 parent f5c70af commit 073abba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[**trieregex**](https://github.com/ermanh/trieregex/) creates efficient regular expressions (regexes) by storing a list of words in a [trie](https://en.wikipedia.org/wiki/Trie) structure, and translating the trie into a more compact pattern.

The speed performance of a trie-based regex (e.g., `r'(?:under(?:sta(?:nd|te))|take|go)?)'`) -- compared to a flat regex union (i.e., `r'(?:understand|understate|undertake|undergo)'`) -- becomes apparent when using extremely large word lists, and especially when more specific or complicated contexts are specified at the boundaries. The processing time of this package itself is also minimized with [memoization](https://en.wikipedia.org/wiki/Memoization).
The speed performance of a trie-based regex (e.g., `r'(?:under(?:sta(?:nd|te)|take|go))'`) -- compared to a flat regex union (i.e., `r'(?:understand|understate|undertake|undergo)'`) -- becomes apparent when using extremely large word lists, and especially when more specific or complicated contexts are specified at the boundaries. The processing time of this package itself is also minimized with [memoization](https://en.wikipedia.org/wiki/Memoization).

## Installation

Expand Down Expand Up @@ -53,7 +53,7 @@ tre.initials() # Returns: ['g', 'k', 't']
tre.finals() # Returns: ['e', 'o', 't']
```

The last two methods are intended for checking what boundary contexts are appropriate for the final regex. More discussed below.
The last two methods are intended for checking what boundary contexts are appropriate for the final regex for pattern matching (discussed below).

## (No) Boundaries

Expand Down

0 comments on commit 073abba

Please sign in to comment.