remove not single syllable
This commit is contained in:
281
cleaned_nouns.csv
Normal file
281
cleaned_nouns.csv
Normal file
@@ -0,0 +1,281 @@
|
||||
a,r,t
|
||||
a,s,h
|
||||
a,x,e
|
||||
b,a,g
|
||||
b,a,l,l
|
||||
b,a,r
|
||||
b,a,t
|
||||
b,a,y
|
||||
b,e,d
|
||||
b,e,e
|
||||
b,e,l,l
|
||||
b,e,l,t
|
||||
b,e,n,c,h
|
||||
b,i,r,d
|
||||
b,o,a,t
|
||||
b,o,o,k
|
||||
b,o,o,t
|
||||
b,o,w
|
||||
b,o,x
|
||||
b,o,y
|
||||
b,r,a,n,c,h
|
||||
b,r,e,a,d
|
||||
b,r,i,d,g,e
|
||||
b,r,u,s,h
|
||||
b,u,s
|
||||
b,u,s,h
|
||||
c,a,k,e
|
||||
c,a,n
|
||||
c,a,p
|
||||
c,a,r
|
||||
c,a,r,d
|
||||
c,a,r,t
|
||||
c,a,t
|
||||
c,h,a,i,n
|
||||
c,h,a,i,r
|
||||
c,h,a,l,k
|
||||
c,h,e,e,s,e
|
||||
c,h,e,s,t
|
||||
c,h,i,l,d
|
||||
c,h,u,r,c,h
|
||||
c,l,a,s,s
|
||||
c,l,o,c,k
|
||||
c,l,o,u,d
|
||||
c,o,a,t
|
||||
c,o,d,e
|
||||
c,o,i,n
|
||||
c,o,u,c,h
|
||||
c,o,u,r,t
|
||||
c,o,w
|
||||
c,r,a,b
|
||||
c,r,e,a,m
|
||||
c,r,o,w
|
||||
c,u,p
|
||||
d,a,d
|
||||
d,a,y
|
||||
d,e,c,k
|
||||
d,e,s,k
|
||||
d,o,g
|
||||
d,o,o,r
|
||||
d,r,e,s,s
|
||||
d,r,i,n,k
|
||||
d,r,o,p
|
||||
d,u,c,k
|
||||
d,u,s,t
|
||||
e,a,r
|
||||
e,a,r,t,h
|
||||
e,g,g
|
||||
e,y,e
|
||||
f,a,c,e
|
||||
f,a,c,t
|
||||
f,a,r,m
|
||||
f,i,e,l,d
|
||||
f,i,l,e
|
||||
f,i,l,m
|
||||
f,i,s,h
|
||||
f,l,a,g
|
||||
f,l,o,o,r
|
||||
f,l,y
|
||||
f,o,g
|
||||
f,o,o,d
|
||||
f,o,o,t
|
||||
f,o,r,k
|
||||
f,o,x
|
||||
f,r,i,e,n,d
|
||||
f,r,o,g
|
||||
f,r,u,i,t
|
||||
g,a,m,e
|
||||
g,a,t,e
|
||||
g,i,r,l
|
||||
g,l,a,s,s
|
||||
g,l,o,v,e
|
||||
g,o,a,t
|
||||
g,o,d
|
||||
g,o,l,d
|
||||
g,r,a,s,s
|
||||
g,r,a,v,e
|
||||
g,r,e,e,n
|
||||
g,r,o,u,n,d
|
||||
g,r,o,u,p
|
||||
g,u,m
|
||||
g,u,n
|
||||
h,a,i,r
|
||||
h,a,n,d
|
||||
h,a,t
|
||||
h,e,a,d
|
||||
h,e,a,r,t
|
||||
h,e,a,t
|
||||
h,i,l,l
|
||||
h,o,l,e
|
||||
h,o,m,e
|
||||
h,o,r,s,e
|
||||
h,o,u,s,e
|
||||
i,c,e
|
||||
i,n,k
|
||||
j,a,m
|
||||
j,a,r
|
||||
j,o,b
|
||||
k,e,y
|
||||
k,i,n,g
|
||||
k,i,s,s
|
||||
k,i,t,e
|
||||
k,n,i,f,e
|
||||
l,a,k,e
|
||||
l,a,m,p
|
||||
l,a,n,d
|
||||
l,a,w
|
||||
l,e,a,f
|
||||
l,e,g
|
||||
l,i,g,h,t
|
||||
l,i,n,e
|
||||
l,i,s,t
|
||||
l,o,c,k
|
||||
l,o,g
|
||||
l,o,v,e
|
||||
l,u,n,c,h
|
||||
m,a,n
|
||||
m,a,p
|
||||
m,a,s,k
|
||||
m,e,a,l
|
||||
m,e,a,t
|
||||
m,e,n
|
||||
m,i,l,k
|
||||
m,i,n,d
|
||||
m,i,n,e
|
||||
m,o,o,n
|
||||
m,o,u,s,e
|
||||
m,o,u,t,h
|
||||
n,a,m,e
|
||||
n,e,c,k
|
||||
n,i,g,h,t
|
||||
n,o,i,s,e
|
||||
n,o,s,e
|
||||
n,o,t,e
|
||||
o,i,l
|
||||
p,a,g,e
|
||||
p,a,i,n
|
||||
p,a,i,n,t
|
||||
p,a,n
|
||||
p,a,r,k
|
||||
p,a,r,t
|
||||
p,a,t,h
|
||||
p,e,a,c,e
|
||||
p,e,a,r
|
||||
p,e,n
|
||||
p,h,o,n,e
|
||||
p,i,e
|
||||
p,i,g
|
||||
p,i,n
|
||||
p,i,p,e
|
||||
p,l,a,c,e
|
||||
p,l,a,n,e
|
||||
p,l,a,n,t
|
||||
p,l,a,t,e
|
||||
p,l,a,y
|
||||
p,o,i,n,t
|
||||
p,o,l,e
|
||||
p,o,o,l
|
||||
p,o,r,t
|
||||
p,o,s,t
|
||||
p,o,t
|
||||
p,r,i,c,e
|
||||
p,r,i,n,c,e
|
||||
q,u,e,e,n
|
||||
r,a,c,e
|
||||
r,a,i,n
|
||||
r,a,t
|
||||
r,i,n,g
|
||||
r,o,a,d
|
||||
r,o,c,k
|
||||
r,o,o,m
|
||||
r,o,o,t
|
||||
r,o,s,e
|
||||
r,u,l,e
|
||||
r,u,n
|
||||
s,a,i,l
|
||||
s,a,l,t
|
||||
s,a,n,d
|
||||
s,c,h,o,o,l
|
||||
s,e,a
|
||||
s,e,a,t
|
||||
s,e,e,d
|
||||
s,h,a,d,e
|
||||
s,h,a,p,e
|
||||
s,h,e,e,p
|
||||
s,h,e,l,f
|
||||
s,h,i,p
|
||||
s,h,i,r,t
|
||||
s,h,o,e
|
||||
s,h,o,p
|
||||
s,h,o,t
|
||||
s,i,d,e
|
||||
s,i,g,n
|
||||
s,i,l,k
|
||||
s,i,z,e
|
||||
s,k,y
|
||||
s,l,e,e,p
|
||||
s,m,i,l,e
|
||||
s,m,o,k,e
|
||||
s,n,a,k,e
|
||||
s,n,o,w
|
||||
s,o,c,k
|
||||
s,o,n
|
||||
s,o,n,g
|
||||
s,o,u,n,d
|
||||
s,o,u,p
|
||||
s,p,a,c,e
|
||||
s,p,e,e,c,h
|
||||
s,p,o,o,n
|
||||
s,p,o,r,t
|
||||
s,p,r,i,n,g
|
||||
s,q,u,a,r,e
|
||||
s,t,a,r
|
||||
s,t,a,t,e
|
||||
s,t,e,a,m
|
||||
s,t,e,e,l
|
||||
s,t,e,p
|
||||
s,t,i,c,k
|
||||
s,t,o,n,e
|
||||
s,t,o,p
|
||||
s,t,o,r,e
|
||||
s,t,o,r,m
|
||||
s,t,r,e,e,t
|
||||
s,t,r,i,n,g
|
||||
s,u,n
|
||||
t,a,i,l
|
||||
t,e,a
|
||||
t,e,a,m
|
||||
t,e,s,t
|
||||
t,e,x,t
|
||||
t,h,r,e,a,d
|
||||
t,h,r,o,n,e
|
||||
t,i,m,e
|
||||
t,o,e
|
||||
t,o,w,n
|
||||
t,o,y
|
||||
t,r,a,i,n
|
||||
t,r,e,e
|
||||
t,r,i,p
|
||||
t,r,u,c,k
|
||||
t,r,u,t,h
|
||||
t,u,b,e
|
||||
t,u,r,n
|
||||
w,a,l,l
|
||||
w,a,r
|
||||
w,a,t,c,h
|
||||
w,a,v,e
|
||||
w,a,y
|
||||
w,e,e,k
|
||||
w,e,i,g,h,t
|
||||
w,e,l,l
|
||||
w,h,e,e,l
|
||||
w,i,n,d
|
||||
w,i,n,e
|
||||
w,i,n,g
|
||||
w,i,s,h
|
||||
w,o,o,d
|
||||
w,o,r,d
|
||||
w,o,r,k
|
||||
w,o,r,l,d
|
||||
y,e,a,r
|
||||
y,o,u,t,h
|
|
311
nouns.csv
Normal file
311
nouns.csv
Normal file
@@ -0,0 +1,311 @@
|
||||
a,r,t
|
||||
a,s,h
|
||||
a,x,e
|
||||
b,a,g
|
||||
b,a,l,l
|
||||
b,a,r
|
||||
b,a,t
|
||||
b,a,y
|
||||
b,e,d
|
||||
b,e,e
|
||||
b,e,l,l
|
||||
b,e,l,t
|
||||
b,e,n,c,h
|
||||
b,i,r,d
|
||||
b,o,a,t
|
||||
b,o,o,k
|
||||
b,o,o,t
|
||||
b,o,w
|
||||
b,o,x
|
||||
b,o,y
|
||||
b,r,a,n,c,h
|
||||
b,r,e,a,d
|
||||
b,r,i,d,g,e
|
||||
b,r,u,s,h
|
||||
b,u,c,k,e,t
|
||||
b,u,s
|
||||
b,u,s,h
|
||||
c,a,k,e
|
||||
c,a,n
|
||||
c,a,p
|
||||
c,a,r
|
||||
c,a,r,d
|
||||
c,a,r,t
|
||||
c,a,t
|
||||
c,h,a,i,n
|
||||
c,h,a,i,r
|
||||
c,h,a,l,k
|
||||
c,h,e,e,s,e
|
||||
c,h,e,s,t
|
||||
c,h,i,c,k,e,n
|
||||
c,h,i,l,d
|
||||
c,h,u,r,c,h
|
||||
c,i,t,y
|
||||
c,l,a,s,s
|
||||
c,l,o,c,k
|
||||
c,l,o,u,d
|
||||
c,o,a,t
|
||||
c,o,d,e
|
||||
c,o,i,n
|
||||
c,o,u,c,h
|
||||
c,o,u,r,t
|
||||
c,o,w
|
||||
c,r,a,b
|
||||
c,r,e,a,m
|
||||
c,r,o,w
|
||||
c,u,p
|
||||
c,u,r,t,a,i,n
|
||||
d,a,d
|
||||
d,a,y
|
||||
d,e,c,k
|
||||
d,e,s,k
|
||||
d,o,g
|
||||
d,o,o,r
|
||||
d,r,e,s,s
|
||||
d,r,i,n,k
|
||||
d,r,o,p
|
||||
d,u,c,k
|
||||
d,u,s,t
|
||||
e,a,r
|
||||
e,a,r,t,h
|
||||
e,g,g
|
||||
e,y,e
|
||||
f,a,c,e
|
||||
f,a,c,t
|
||||
f,a,r,m
|
||||
f,i,e,l,d
|
||||
f,i,l,e
|
||||
f,i,l,m
|
||||
f,i,r,e
|
||||
f,i,s,h
|
||||
f,l,a,g
|
||||
f,l,o,o,r
|
||||
f,l,o,w,e,r
|
||||
f,l,y
|
||||
f,o,g
|
||||
f,o,o,d
|
||||
f,o,o,t
|
||||
f,o,r,k
|
||||
f,o,x
|
||||
f,r,i,e,n,d
|
||||
f,r,o,g
|
||||
f,r,u,i,t
|
||||
g,a,m,e
|
||||
g,a,t,e
|
||||
g,i,r,l
|
||||
g,l,a,s,s
|
||||
g,l,o,v,e
|
||||
g,o,a,t
|
||||
g,o,d
|
||||
g,o,l,d
|
||||
g,r,a,s,s
|
||||
g,r,a,v,e
|
||||
g,r,e,e,n
|
||||
g,r,o,u,n,d
|
||||
g,r,o,u,p
|
||||
g,u,m
|
||||
g,u,n
|
||||
h,a,i,r
|
||||
h,a,n,d
|
||||
h,a,t
|
||||
h,e,a,d
|
||||
h,e,a,r,t
|
||||
h,e,a,t
|
||||
h,i,l,l
|
||||
h,o,l,e
|
||||
h,o,m,e
|
||||
h,o,r,s,e
|
||||
h,o,u,s,e
|
||||
i,c,e
|
||||
i,n,k
|
||||
j,a,c,k,e,t
|
||||
j,a,m
|
||||
j,a,r
|
||||
j,o,b
|
||||
k,e,y
|
||||
k,i,n,g
|
||||
k,i,s,s
|
||||
k,i,t,e
|
||||
k,n,i,f,e
|
||||
l,a,d,y
|
||||
l,a,k,e
|
||||
l,a,m,p
|
||||
l,a,n,d
|
||||
l,a,w
|
||||
l,e,a,f
|
||||
l,e,g
|
||||
l,e,t,t,e,r
|
||||
l,i,g,h,t
|
||||
l,i,n,e
|
||||
l,i,o,n
|
||||
l,i,s,t
|
||||
l,o,c,k
|
||||
l,o,g
|
||||
l,o,v,e
|
||||
l,u,n,c,h
|
||||
m,a,n
|
||||
m,a,p
|
||||
m,a,s,k
|
||||
m,e,a,l
|
||||
m,e,a,t
|
||||
m,e,n
|
||||
m,i,l,k
|
||||
m,i,n,d
|
||||
m,i,n,e
|
||||
m,o,o,n
|
||||
m,o,r,n,i,n,g
|
||||
m,o,t,h,e,r
|
||||
m,o,u,s,e
|
||||
m,o,u,t,h
|
||||
n,a,m,e
|
||||
n,e,c,k
|
||||
n,i,g,h,t
|
||||
n,o,i,s,e
|
||||
n,o,s,e
|
||||
n,o,t,e
|
||||
o,c,e,a,n
|
||||
o,f,f,i,c,e
|
||||
o,i,l
|
||||
o,r,a,n,g,e
|
||||
p,a,g,e
|
||||
p,a,i,n
|
||||
p,a,i,n,t
|
||||
p,a,n
|
||||
p,a,p,e,r
|
||||
p,a,r,k
|
||||
p,a,r,t
|
||||
p,a,r,t,y
|
||||
p,a,t,h
|
||||
p,e,a,c,e
|
||||
p,e,a,r
|
||||
p,e,n
|
||||
p,e,n,c,i,l
|
||||
p,e,o,p,l,e
|
||||
p,h,o,n,e
|
||||
p,h,o,t,o
|
||||
p,i,e
|
||||
p,i,g
|
||||
p,i,n
|
||||
p,i,p,e
|
||||
p,l,a,c,e
|
||||
p,l,a,n,e
|
||||
p,l,a,n,t
|
||||
p,l,a,t,e
|
||||
p,l,a,y
|
||||
p,o,i,n,t
|
||||
p,o,l,e
|
||||
p,o,o,l
|
||||
p,o,r,t
|
||||
p,o,s,t
|
||||
p,o,t
|
||||
p,r,i,c,e
|
||||
p,r,i,n,c,e
|
||||
q,u,e,e,n
|
||||
r,a,c,e
|
||||
r,a,i,n
|
||||
r,a,t
|
||||
r,i,n,g
|
||||
r,i,v,e,r
|
||||
r,o,a,d
|
||||
r,o,c,k
|
||||
r,o,o,m
|
||||
r,o,o,t
|
||||
r,o,s,e
|
||||
r,u,l,e
|
||||
r,u,n
|
||||
s,a,i,l
|
||||
s,a,l,t
|
||||
s,a,n,d
|
||||
s,c,h,o,o,l
|
||||
s,e,a
|
||||
s,e,a,t
|
||||
s,e,e,d
|
||||
s,h,a,d,e
|
||||
s,h,a,p,e
|
||||
s,h,e,e,p
|
||||
s,h,e,l,f
|
||||
s,h,i,p
|
||||
s,h,i,r,t
|
||||
s,h,o,e
|
||||
s,h,o,p
|
||||
s,h,o,t
|
||||
s,i,d,e
|
||||
s,i,g,n
|
||||
s,i,l,k
|
||||
s,i,s,t,e,r
|
||||
s,i,z,e
|
||||
s,k,y
|
||||
s,l,e,e,p
|
||||
s,m,i,l,e
|
||||
s,m,o,k,e
|
||||
s,n,a,k,e
|
||||
s,n,o,w
|
||||
s,o,c,k
|
||||
s,o,n
|
||||
s,o,n,g
|
||||
s,o,u,n,d
|
||||
s,o,u,p
|
||||
s,p,a,c,e
|
||||
s,p,e,e,c,h
|
||||
s,p,o,o,n
|
||||
s,p,o,r,t
|
||||
s,p,r,i,n,g
|
||||
s,q,u,a,r,e
|
||||
s,t,a,r
|
||||
s,t,a,t,e
|
||||
s,t,e,a,m
|
||||
s,t,e,e,l
|
||||
s,t,e,p
|
||||
s,t,i,c,k
|
||||
s,t,o,n,e
|
||||
s,t,o,p
|
||||
s,t,o,r,e
|
||||
s,t,o,r,m
|
||||
s,t,r,e,e,t
|
||||
s,t,r,i,n,g
|
||||
s,t,u,d,e,n,t
|
||||
s,u,n
|
||||
t,a,b,l,e
|
||||
t,a,i,l
|
||||
t,e,a
|
||||
t,e,a,c,h,e,r
|
||||
t,e,a,m
|
||||
t,e,s,t
|
||||
t,e,x,t
|
||||
t,h,r,e,a,d
|
||||
t,h,r,o,n,e
|
||||
t,i,m,e
|
||||
t,o,e
|
||||
t,o,w,n
|
||||
t,o,y
|
||||
t,r,a,i,n
|
||||
t,r,e,e
|
||||
t,r,i,p
|
||||
t,r,u,c,k
|
||||
t,r,u,t,h
|
||||
t,u,b,e
|
||||
t,u,r,n
|
||||
w,a,l,l
|
||||
w,a,r
|
||||
w,a,t,c,h
|
||||
w,a,t,e,r
|
||||
w,a,v,e
|
||||
w,a,y
|
||||
w,e,e,k
|
||||
w,e,i,g,h,t
|
||||
w,e,l,l
|
||||
w,h,e,e,l
|
||||
w,i,n,d
|
||||
w,i,n,d,o,w
|
||||
w,i,n,e
|
||||
w,i,n,g
|
||||
w,i,n,t,e,r
|
||||
w,i,r,e
|
||||
w,i,s,h
|
||||
w,o,m,a,n
|
||||
w,o,o,d
|
||||
w,o,r,d
|
||||
w,o,r,k
|
||||
w,o,r,l,d
|
||||
y,e,a,r
|
||||
y,o,u,t,h
|
|
264
words_syllables.ipynb
Normal file
264
words_syllables.ipynb
Normal file
@@ -0,0 +1,264 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"id": "77365834-52b5-4443-8cc8-4ffdf0a847ba",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import csv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "d1c44d5e-ed2f-4122-b2ac-fcb9dca2358f",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"single_syllable_nouns = [\n",
|
||||
" \"art\", \"ash\", \"axe\", \"bag\", \"ball\", \"bar\", \"bat\", \"bay\", \"bed\", \"bee\",\n",
|
||||
" \"bell\", \"belt\", \"bench\", \"bird\", \"boat\", \"book\", \"boot\", \"bow\", \"box\", \"boy\",\n",
|
||||
" \"branch\", \"bread\", \"bridge\", \"brush\", \"bucket\", \"bus\", \"bush\", \"cake\", \"can\",\n",
|
||||
" \"cap\", \"car\", \"card\", \"cart\", \"cat\", \"chain\", \"chair\", \"chalk\", \"cheese\", \"chest\",\n",
|
||||
" \"chicken\", \"child\", \"church\", \"city\", \"class\", \"clock\", \"cloud\", \"coat\", \"code\",\n",
|
||||
" \"coin\", \"couch\", \"court\", \"cow\", \"crab\", \"cream\", \"crow\", \"cup\", \"curtain\", \"dad\",\n",
|
||||
" \"day\", \"deck\", \"desk\", \"dog\", \"door\", \"dress\", \"drink\", \"drop\", \"duck\", \"dust\",\n",
|
||||
" \"ear\", \"earth\", \"egg\", \"eye\", \"face\", \"fact\", \"farm\", \"field\", \"file\", \"film\",\n",
|
||||
" \"fire\", \"fish\", \"flag\", \"floor\", \"flower\", \"fly\", \"fog\", \"food\", \"foot\", \"fork\",\n",
|
||||
" \"fox\", \"friend\", \"frog\", \"fruit\", \"game\", \"gate\", \"girl\", \"glass\", \"glove\", \"goat\",\n",
|
||||
" \"god\", \"gold\", \"grass\", \"grave\", \"green\", \"ground\", \"group\", \"gum\", \"gun\", \"hair\",\n",
|
||||
" \"hand\", \"hat\", \"head\", \"heart\", \"heat\", \"hill\", \"hole\", \"home\", \"horse\", \"house\",\n",
|
||||
" \"ice\", \"ink\", \"jacket\", \"jam\", \"jar\", \"job\", \"key\", \"king\", \"kiss\", \"kite\",\n",
|
||||
" \"knife\", \"lady\", \"lake\", \"lamp\", \"land\", \"law\", \"leaf\", \"leg\", \"letter\", \"light\",\n",
|
||||
" \"line\", \"lion\", \"list\", \"lock\", \"log\", \"love\", \"lunch\", \"man\", \"map\", \"mask\",\n",
|
||||
" \"meal\", \"meat\", \"men\", \"milk\", \"mind\", \"mine\", \"moon\", \"morning\", \"mother\", \"mouse\",\n",
|
||||
" \"mouth\", \"name\", \"neck\", \"night\", \"noise\", \"nose\", \"note\", \"ocean\", \"office\", \"oil\",\n",
|
||||
" \"orange\", \"page\", \"pain\", \"paint\", \"pan\", \"paper\", \"park\", \"part\", \"party\", \"path\",\n",
|
||||
" \"peace\", \"pear\", \"pen\", \"pencil\", \"people\", \"phone\", \"photo\", \"pie\", \"pig\", \"pin\",\n",
|
||||
" \"pipe\", \"place\", \"plane\", \"plant\", \"plate\", \"play\", \"point\", \"pole\", \"pool\", \"port\",\n",
|
||||
" \"post\", \"pot\", \"price\", \"prince\", \"queen\", \"race\", \"rain\", \"rat\", \"ring\", \"river\",\n",
|
||||
" \"road\", \"rock\", \"room\", \"root\", \"rose\", \"rule\", \"run\", \"sail\", \"salt\", \"sand\",\n",
|
||||
" \"school\", \"sea\", \"seat\", \"seed\", \"shade\", \"shape\", \"sheep\", \"shelf\", \"ship\", \"shirt\",\n",
|
||||
" \"shoe\", \"shop\", \"shot\", \"side\", \"sign\", \"silk\", \"sister\", \"size\", \"sky\", \"sleep\",\n",
|
||||
" \"smile\", \"smoke\", \"snake\", \"snow\", \"sock\", \"son\", \"song\", \"sound\", \"soup\", \"space\",\n",
|
||||
" \"speech\", \"spoon\", \"sport\", \"spring\", \"square\", \"star\", \"state\", \"steam\", \"steel\",\n",
|
||||
" \"step\", \"stick\", \"stone\", \"stop\", \"store\", \"storm\", \"street\", \"string\", \"student\", \"sun\",\n",
|
||||
" \"table\", \"tail\", \"tea\", \"teacher\", \"team\", \"test\", \"text\", \"thread\", \"throne\", \"time\",\n",
|
||||
" \"toe\", \"town\", \"toy\", \"train\", \"tree\", \"trip\", \"truck\", \"truth\", \"tube\", \"turn\",\n",
|
||||
" \"wall\", \"war\", \"watch\", \"water\", \"wave\", \"way\", \"week\", \"weight\", \"well\", \"wheel\",\n",
|
||||
" \"wind\", \"window\", \"wine\", \"wing\", \"winter\", \"wire\", \"wish\", \"woman\", \"wood\", \"word\",\n",
|
||||
" \"work\", \"world\", \"year\", \"youth\"\n",
|
||||
"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "c7b08367-f320-459e-9dda-6392e533e979",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open('nouns.csv', 'w', newline='') as csvfile:\n",
|
||||
" writer = csv.writer(csvfile)\n",
|
||||
" writer.writerows(single_syllable_nouns)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "1dcce87e-6b3f-4e45-b28c-499bbe1d33c9",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import nltk\n",
|
||||
"from nltk.corpus import cmudict"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "86f80604-fb54-46bd-ab2a-5331ec7e5411",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[nltk_data] Downloading package cmudict to /home/changcl/nltk_data...\n",
|
||||
"[nltk_data] Package cmudict is already up-to-date!\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Download the CMU Pronouncing Dictionary\n",
|
||||
"nltk.download('cmudict')\n",
|
||||
"\n",
|
||||
"d = cmudict.dict()\n",
|
||||
"\n",
|
||||
"def count_syllables(word):\n",
|
||||
" try:\n",
|
||||
" return [len(list(y for y in x if y[-1].isdigit())) for x in d[word.lower()]][0]\n",
|
||||
" except KeyError:\n",
|
||||
" return 0"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ff7f7385-d2b4-439b-9079-6de0775b9435",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Test a few words\n",
|
||||
"test_words = [\"computer\", \"cat\", \"elephant\", \"dog\", \"important\"]\n",
|
||||
"for word in test_words:\n",
|
||||
" print(f\"'{word}': {count_syllables(word)} syllables\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "51222d43-baaa-48ed-8b9f-58fc22bbe769",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"'bucket': 2 syllables\n",
|
||||
"'chicken': 2 syllables\n",
|
||||
"'city': 2 syllables\n",
|
||||
"'curtain': 2 syllables\n",
|
||||
"'fire': 2 syllables\n",
|
||||
"'flower': 2 syllables\n",
|
||||
"'jacket': 2 syllables\n",
|
||||
"'lady': 2 syllables\n",
|
||||
"'letter': 2 syllables\n",
|
||||
"'lion': 2 syllables\n",
|
||||
"'morning': 2 syllables\n",
|
||||
"'mother': 2 syllables\n",
|
||||
"'ocean': 2 syllables\n",
|
||||
"'office': 2 syllables\n",
|
||||
"'orange': 2 syllables\n",
|
||||
"'paper': 2 syllables\n",
|
||||
"'party': 2 syllables\n",
|
||||
"'pencil': 2 syllables\n",
|
||||
"'people': 2 syllables\n",
|
||||
"'photo': 2 syllables\n",
|
||||
"'river': 2 syllables\n",
|
||||
"'sister': 2 syllables\n",
|
||||
"'student': 2 syllables\n",
|
||||
"'table': 2 syllables\n",
|
||||
"'teacher': 2 syllables\n",
|
||||
"'water': 2 syllables\n",
|
||||
"'window': 2 syllables\n",
|
||||
"'winter': 2 syllables\n",
|
||||
"'wire': 2 syllables\n",
|
||||
"'woman': 2 syllables\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Test a few words\n",
|
||||
"# test_words = [\"computer\", \"cat\", \"elephant\", \"dog\", \"important\"]\n",
|
||||
"for word in single_syllable_nouns:\n",
|
||||
" count = count_syllables(word)\n",
|
||||
" if count > 1:\n",
|
||||
" print(f\"'{word}': {count} syllables\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "218a5ad4-33b7-4e73-af1b-ba8c6303f012",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"['bucket', 'chicken', 'city', 'curtain', 'fire', 'flower', 'jacket', 'lady', 'letter', 'lion', 'morning', 'mother', 'ocean', 'office', 'orange', 'paper', 'party', 'pencil', 'people', 'photo', 'river', 'sister', 'student', 'table', 'teacher', 'water', 'window', 'winter', 'wire', 'woman']\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"not_single_syllable = []\n",
|
||||
"for word in single_syllable_nouns:\n",
|
||||
" count = count_syllables(word)\n",
|
||||
" if count > 1:\n",
|
||||
" not_single_syllable.append(word)\n",
|
||||
"print(not_single_syllable)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "629d364b-9120-4615-8e04-8704a9ccddf6",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"```\n",
|
||||
"list_1 = ['apple', 'banana', 'orange', 'grape', 'kiwi']\n",
|
||||
"list_2 = ['banana', 'kiwi']\n",
|
||||
"\n",
|
||||
"# Remove items from list_1 that are in list_2\n",
|
||||
"list_1 = [item for item in list_1 if item not in list_2]\n",
|
||||
"\n",
|
||||
"print(list_1) # Output: ['apple', 'orange', 'grape']\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"id": "5c2a24e2-f027-40c9-aca2-ddb8a1a4d969",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"['art', 'ash', 'axe', 'bag', 'ball', 'bar', 'bat', 'bay', 'bed', 'bee', 'bell', 'belt', 'bench', 'bird', 'boat', 'book', 'boot', 'bow', 'box', 'boy', 'branch', 'bread', 'bridge', 'brush', 'bus', 'bush', 'cake', 'can', 'cap', 'car', 'card', 'cart', 'cat', 'chain', 'chair', 'chalk', 'cheese', 'chest', 'child', 'church', 'class', 'clock', 'cloud', 'coat', 'code', 'coin', 'couch', 'court', 'cow', 'crab', 'cream', 'crow', 'cup', 'dad', 'day', 'deck', 'desk', 'dog', 'door', 'dress', 'drink', 'drop', 'duck', 'dust', 'ear', 'earth', 'egg', 'eye', 'face', 'fact', 'farm', 'field', 'file', 'film', 'fish', 'flag', 'floor', 'fly', 'fog', 'food', 'foot', 'fork', 'fox', 'friend', 'frog', 'fruit', 'game', 'gate', 'girl', 'glass', 'glove', 'goat', 'god', 'gold', 'grass', 'grave', 'green', 'ground', 'group', 'gum', 'gun', 'hair', 'hand', 'hat', 'head', 'heart', 'heat', 'hill', 'hole', 'home', 'horse', 'house', 'ice', 'ink', 'jam', 'jar', 'job', 'key', 'king', 'kiss', 'kite', 'knife', 'lake', 'lamp', 'land', 'law', 'leaf', 'leg', 'light', 'line', 'list', 'lock', 'log', 'love', 'lunch', 'man', 'map', 'mask', 'meal', 'meat', 'men', 'milk', 'mind', 'mine', 'moon', 'mouse', 'mouth', 'name', 'neck', 'night', 'noise', 'nose', 'note', 'oil', 'page', 'pain', 'paint', 'pan', 'park', 'part', 'path', 'peace', 'pear', 'pen', 'phone', 'pie', 'pig', 'pin', 'pipe', 'place', 'plane', 'plant', 'plate', 'play', 'point', 'pole', 'pool', 'port', 'post', 'pot', 'price', 'prince', 'queen', 'race', 'rain', 'rat', 'ring', 'road', 'rock', 'room', 'root', 'rose', 'rule', 'run', 'sail', 'salt', 'sand', 'school', 'sea', 'seat', 'seed', 'shade', 'shape', 'sheep', 'shelf', 'ship', 'shirt', 'shoe', 'shop', 'shot', 'side', 'sign', 'silk', 'size', 'sky', 'sleep', 'smile', 'smoke', 'snake', 'snow', 'sock', 'son', 'song', 'sound', 'soup', 'space', 'speech', 'spoon', 'sport', 'spring', 'square', 'star', 'state', 'steam', 'steel', 'step', 'stick', 'stone', 'stop', 'store', 'storm', 'street', 'string', 'sun', 'tail', 'tea', 'team', 'test', 'text', 'thread', 'throne', 'time', 'toe', 'town', 'toy', 'train', 'tree', 'trip', 'truck', 'truth', 'tube', 'turn', 'wall', 'war', 'watch', 'wave', 'way', 'week', 'weight', 'well', 'wheel', 'wind', 'wine', 'wing', 'wish', 'wood', 'word', 'work', 'world', 'year', 'youth']\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"single_syllable_nouns_cleaned = [item for item in single_syllable_nouns if item not in not_single_syllable]\n",
|
||||
"print(single_syllable_nouns_cleaned)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"id": "9701af0e-440e-4cf7-886d-815fc720eb68",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open('cleaned_nouns.csv', 'w', newline='') as csvfile:\n",
|
||||
" writer = csv.writer(csvfile)\n",
|
||||
" writer.writerows(single_syllable_nouns_cleaned)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.11"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
Reference in New Issue
Block a user