Corrected more typos in README, text formatting
This commit is contained in:
parent
864df8140f
commit
792847c830
@ -44,7 +44,7 @@ Every character encountered is presented to a state object within the
|
|||||||
the new current state.
|
the new current state.
|
||||||
|
|
||||||
However, if there is no matching state, the algorithm will signal a
|
However, if there is no matching state, the algorithm will signal a
|
||||||
*fail* and fall back to states with less depth (i.e.,, a match less long)
|
*fail* and fall back to states with less depth (i.e., a match less long)
|
||||||
and proceed from there, until it found a matching state, or it has reached
|
and proceed from there, until it found a matching state, or it has reached
|
||||||
the root state.
|
the root state.
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ The Aho-Corasick algorithm can help:
|
|||||||
|
|
||||||
* find words in texts to link or emphasize them;
|
* find words in texts to link or emphasize them;
|
||||||
* add semantics to plain text; or
|
* add semantics to plain text; or
|
||||||
* checki against a dictionary to see if syntactic errors were made.
|
* check against a dictionary to see if syntactic errors were made.
|
||||||
|
|
||||||
See the [white paper](http://cr.yp.to/bib/1975/aho.pdf) by Aho and
|
See the [white paper](http://cr.yp.to/bib/1975/aho.pdf) by Aho and
|
||||||
Corasick for algorithmic details.
|
Corasick for algorithmic details.
|
||||||
@ -207,8 +207,9 @@ html.append("</p></body></html>");
|
|||||||
System.out.println(html);
|
System.out.println(html);
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also emit custom outputs. This might for example be useful to implement a trivial named entity
|
You can also emit custom outputs. This might for example be useful to
|
||||||
recognizer. In this case use a PayloadTrie instead of a Trie:
|
implement a trivial named entity recognizer. In this case use a
|
||||||
|
`PayloadTrie` instead of a `Trie` as follows:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
class Word {
|
class Word {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user