-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmudaan.py
More file actions
19 lines (16 loc) · 747 Bytes
/
cmudaan.py
File metadata and controls
19 lines (16 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from .scripts.graphs import Random, WordList, Synonym
def graph_random(n:int = 10, seq:str = None, startswith:bool = None, show:bool = False):
graph = Random(n = n, seq = seq, startswith = startswith).find
if show:
graph.show_graph()
return graph
def graph_wordlist(wordlist: list, communities: bool = None, show:bool = False):
graph = WordList(wordlist = wordlist, communities=communities).find
if show:
graph.show_graph()
return graph
def graph_synonym(word: str, communities: bool = None, n_synonyms: int = None, n:int = 10, show:bool = False):
graph = Synonym(word = word, communities = communities, n_synonyms = n_synonyms, n = n).find
if show:
graph.show_graph()
return graph