-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtesti.py
More file actions
30 lines (18 loc) · 750 Bytes
/
testi.py
File metadata and controls
30 lines (18 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import finmeter
print( finmeter.hyphenate("krooninen") )
print(finmeter.is_short_syllable("tu") )
"""
from finmeter import semantics
print(semantics.concreteness("kissa"))
print(semantics.is_concrete("kissa"))
print(semantics.semantic_clusters(["kissa", "koira", "näätä", "hauki", "vesi", "lemmikki", "puhelin", "tieto|kone", "toimisto"]))
print(semantics.similarity_clusters(["koira", "kissa", "hevonen"], ["talo", "koti", "ovi"]))
#print(semantics.cluster_centroid(["koira", "kissa", "hevonen"]))
"""
from finmeter import metaphor
print(metaphor.interpret("mies", "susi", maximum=10))
"""
from finmeter import sentiment
print(sentiment.predict("täällä on sika kivaa")
print(sentiment.predict("tällä on tylsää ja huonoa"))
"""