Sfoglia il codice sorgente

Return the correct empty chain.

tags/v0.2
Ben Kurtovic 10 anni fa
parent
commit
c3ddc3d35a
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 2
- 1
earwigbot/wiki/copyvios/__init__.py Vedi File

@@ -110,7 +110,8 @@ class CopyvioMixIn(object):
"""
html = self._open_url_ignoring_errors(url)
if not html:
return 0, ()
empty = MarkovChain("")
return 0, (empty, MarkovChainIntersection(empty, empty))

source = MarkovChain(HTMLTextParser(html).strip())
delta = MarkovChainIntersection(article, source)


Caricamento…
Annulla
Salva