Skip to content

Commit

Permalink
docstrings updated
Browse files Browse the repository at this point in the history
  • Loading branch information
observerss committed Jan 5, 2012
1 parent 3d96110 commit 0be8132
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
很短但是觉得挺有用的东东
所以单独立了个项目备份一下

USAGE:

>>> f = DFAFilter()
>>> f.add("sexy")
>>> f.filter("hello sexy baby")
hello **** baby
7 changes: 3 additions & 4 deletions filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ class NaiveFilter():
very simple filter implementation
>>> f = Filter()
>>> f = Filter()
>>> f = NaiveFilter()
>>> f.add("sexy")
>>> f.filter("hello sexy baby")
hello **** baby
Expand All @@ -38,7 +37,7 @@ class BSFilter:
Use Back Sorted Mapping to reduce replacement times
>>> f = Filter()
>>> f = BSFilter()
>>> f.add("sexy")
>>> f.filter("hello sexy baby")
hello **** baby
Expand Down Expand Up @@ -86,7 +85,7 @@ class DFAFilter():
Use DFA to keep algorithm perform constantly
>>> f = Filter()
>>> f = DFAFilter()
>>> f.add("sexy")
>>> f.filter("hello sexy baby")
hello **** baby
Expand Down

0 comments on commit 0be8132

Please sign in to comment.