1b43ea3d9f7db02075536d9578891af06e324b9a,scattertext/WhitespaceNLP.py,,whitespace_nlp_with_sentences,#Any#Any#Any#,111

Before Change


def whitespace_nlp_with_sentences(doc, entity_type=None, tag_type=None):
	pat = re.compile(r"([A-Z][^\.!?]*[\.!?])", re.M)
	sents = []
	for sent in pat.findall(doc):
		toks = []
		for tok in re.split(r"(\W)", sent):
			pos = "WORD"

After Change


def whitespace_nlp_with_sentences(doc, entity_type=None, tag_type=None):
	pat = re.compile(r"([^\.!?]*?[\.!?$])", re.M)
	sents = []
	raw_sents = pat.findall(doc)
	if len(raw_sents) == 0:
		raw_sents = [doc]
	for sent in raw_sents:
		toks = []
		for tok in re.split(r"(\W)", sent):
			if len(tok) > 0:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: JasonKessler/scattertext
Commit Name: 1b43ea3d9f7db02075536d9578891af06e324b9a
Time: 2017-12-04
Author: jason.kessler@gmail.com
File Name: scattertext/WhitespaceNLP.py
Class Name:
Method Name: whitespace_nlp_with_sentences


Project Name: Rostlab/nalaf
Commit Name: 6871323143600611e960fab2f014194036f7be9b
Time: 2016-04-13
Author: aleksandar.bojchevski@gmail.com
File Name: nalaf/utils/download.py
Class Name: DownloadArticle
Method Name: download


Project Name: osmr/imgclsmob
Commit Name: d9f6e28568406c162b79f582ae037a89a3118d26
Time: 2021-02-16
Author: osemery@gmail.com
File Name: prep_model.py
Class Name:
Method Name: post_process