minko186 commited on
Commit
2b72059
·
1 Parent(s): 23ec282

simplified sentence logic

Browse files
Files changed (1) hide show
  1. plagiarism.py +2 -10
plagiarism.py CHANGED
@@ -71,16 +71,8 @@ def split_sentence_blocks(text, size):
71
  blocks = text.split("\n")
72
  return blocks
73
  else:
74
- blocks = []
75
- size = 1
76
- for para in text.split("\n\n"):
77
- sents = sent_tokenize(para)
78
- for i in range(len(sents)):
79
- if (i % size) == 0:
80
- blocks.append(sents[i])
81
- else:
82
- blocks[int(i / size)] += " " + sents[i]
83
- return blocks
84
 
85
 
86
  def build_date(year=2024, month="March", day=1):
 
71
  blocks = text.split("\n")
72
  return blocks
73
  else:
74
+ sents = sent_tokenize(text)
75
+ return sents
 
 
 
 
 
 
 
 
76
 
77
 
78
  def build_date(year=2024, month="March", day=1):