回答編集履歴
1
コード修正
test
CHANGED
@@ -10,19 +10,11 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
#日本語ツイートを読み込む + 文書数を表示
|
14
|
-
|
15
|
-
count = 0
|
16
|
-
|
17
13
|
with codecs.open("test.txt", "r", "utf-8") as f:
|
18
14
|
|
19
|
-
co
|
15
|
+
count = len(re.split('[。!!??]', f.read()))
|
20
16
|
|
21
|
-
|
22
|
-
|
23
|
-
num_lines = sum(1 for line in open("test.txt"))
|
24
|
-
|
25
|
-
print(
|
17
|
+
print(count)
|
26
18
|
|
27
19
|
|
28
20
|
|