| @@ -30,11 +30,13 @@ try: | |||||
| except ImportError: | except ImportError: | ||||
| oauth = None | oauth = None | ||||
| from earwigbot.wiki.copyvios.markov import MarkovChain, MarkovChainIntersection | |||||
| from earwigbot.wiki.copyvios.parsers import ArticleTextParser, HTMLTextParser | |||||
| from earwigbot.wiki.copyvios.search import YahooBOSSSearchEngine | |||||
| from earwigbot.wiki.copyvios.markov import * | |||||
| from earwigbot.wiki.copyvios.parsers import * | |||||
| from earwigbot.wiki.copyvios.search import * | |||||
| from earwigbot.wiki.exceptions import * | from earwigbot.wiki.exceptions import * | ||||
| __all__ = ["CopyvioCheckResult", "CopyvioMixin"] | |||||
| class CopyvioCheckResult(object): | class CopyvioCheckResult(object): | ||||
| def __init__(self, violation, confidence, url, queries, article, chains): | def __init__(self, violation, confidence, url, queries, article, chains): | ||||
| self.violation = violation | self.violation = violation | ||||
| @@ -23,6 +23,8 @@ | |||||
| from collections import defaultdict | from collections import defaultdict | ||||
| from re import sub, UNICODE | from re import sub, UNICODE | ||||
| __all__ = ["MarkovChain", "MarkovChainIntersection"] | |||||
| class MarkovChain(object): | class MarkovChain(object): | ||||
| START = -1 | START = -1 | ||||
| END = -2 | END = -2 | ||||
| @@ -20,6 +20,8 @@ | |||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | # SOFTWARE. | ||||
| __all__ = ["BaseTextParser", "ArticleTextParser", "HTMLTextParser"] | |||||
| class BaseTextParser(object): | class BaseTextParser(object): | ||||
| def __init__(self, text): | def __init__(self, text): | ||||
| self.text = text | self.text = text | ||||
| @@ -30,6 +30,8 @@ except ImportError: | |||||
| from earwigbot.wiki.exceptions import SearchQueryError | from earwigbot.wiki.exceptions import SearchQueryError | ||||
| __all__ = ["BaseSearchEngine", "YahooBOSSSearchEngine"] | |||||
| class BaseSearchEngine(object): | class BaseSearchEngine(object): | ||||
| def __init__(self, cred): | def __init__(self, cred): | ||||
| """Store credentials 'cred' for searching later on.""" | """Store credentials 'cred' for searching later on.""" | ||||