44d3cc8e594304051b8fd20b9723a0c978068fe7,hazm/DependencyParser.py,DependencyParser,tagged_batch_parse,#DependencyParser#Any#Any#,17
Before Change
if self._execute(cmd, verbose) != 0:
raise Exception("MaltParser parsing failed: %s" % (" ".join(cmd)))
with codecs.open(output_filename, encoding="utf8") as output_file:
return [DependencyGraph(item) for item in output_file.read().split("\n\n")]
if __name__ == "__main__":
import doctest
doctest.testmod(extraglobs={"parser": DependencyParser(tagger=POSTagger())})
After Change
for i, (word, tag) in enumerate(sentence, start=1):
word = word.strip()
if not word: word = "_"
input_file.write(("\t".join([str(i), word.replace(" ", "_"), self.lemmatize(word, tag).replace(" ", "_"), tag, tag, "_", "0", "ROOT", "_", "_", "\n"])).encode("utf8"))
input_file.write("\n\n".encode("utf8"))
input_file.close()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 2
Instances
Project Name: sobhe/hazm
Commit Name: 44d3cc8e594304051b8fd20b9723a0c978068fe7
Time: 2013-12-26
Author: alireza.nournia@gmail.com
File Name: hazm/DependencyParser.py
Class Name: DependencyParser
Method Name: tagged_batch_parse
Project Name: RaRe-Technologies/gensim
Commit Name: 99151db71b27cef5fb58beef3b51d82842cee167
Time: 2017-03-30
Author: parul1sethi@gmail.com
File Name: gensim/scripts/glove2word2vec.py
Class Name:
Method Name: glove2word2vec
Project Name: tensorflow/datasets
Commit Name: c1d5d469f7107a5a395c7915c0eff1696ebda7bb
Time: 2020-05-15
Author: epot@google.com
File Name: tensorflow_datasets/testing/test_utils.py
Class Name: MockFs
Method Name: _open
Project Name: home-assistant/home-assistant
Commit Name: 272539105f949ac28e37adac0474ac28d65256e0
Time: 2016-10-17
Author: rob.capellini@gmail.com
File Name: tests/components/test_api.py
Class Name: TestAPI
Method Name: test_api_get_error_log