gensim/corpora/svmlightcorpus.py
Killed 0 out of 7 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 192
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -16,7 +16,7 @@
from gensim.corpora import IndexedCorpus
-logger = logging.getLogger(__name__)
+logger = None
class SvmLightCorpus(IndexedCorpus):
Mutant 193
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -43,7 +43,7 @@
"""
- def __init__(self, fname, store_labels=True):
+ def __init__(self, fname, store_labels=False):
"""
Parameters
Mutant 194
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -83,7 +83,6 @@
yield doc[0]
self.length = lineno + 1
- @staticmethod
def save_corpus(fname, corpus, id2word=None, labels=False, metadata=False):
"""Save a corpus in the SVMlight format.
Mutant 195
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -84,7 +84,7 @@
self.length = lineno + 1
@staticmethod
- def save_corpus(fname, corpus, id2word=None, labels=False, metadata=False):
+ def save_corpus(fname, corpus, id2word=None, labels=True, metadata=False):
"""Save a corpus in the SVMlight format.
The SVMlight `` class tag is taken from the `labels` array, or set to 0 for all documents
Mutant 196
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -84,7 +84,7 @@
self.length = lineno + 1
@staticmethod
- def save_corpus(fname, corpus, id2word=None, labels=False, metadata=False):
+ def save_corpus(fname, corpus, id2word=None, labels=False, metadata=True):
"""Save a corpus in the SVMlight format.
The SVMlight `` class tag is taken from the `labels` array, or set to 0 for all documents
Mutant 197
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -167,7 +167,6 @@
doc = [(int(p1) - 1, float(p2)) for p1, p2 in fields if p1 != 'qid']
return doc, target
- @staticmethod
def doc2line(doc, label=0):
"""Convert BoW representation of document in SVMlight format.
This method inverse of :meth:`~gensim.corpora.svmlightcorpus.SvmLightCorpus.line2doc`.
Mutant 198
--- gensim/corpora/svmlightcorpus.py
+++ gensim/corpora/svmlightcorpus.py
@@ -168,7 +168,7 @@
return doc, target
@staticmethod
- def doc2line(doc, label=0):
+ def doc2line(doc, label=1):
"""Convert BoW representation of document in SVMlight format.
This method inverse of :meth:`~gensim.corpora.svmlightcorpus.SvmLightCorpus.line2doc`.