= Path('.')
p = p.absolute().parent.parent/'mnt'/'e'
e 2) coll_repr(e.ls(),
Utils
This module tries to include most of the plotting functionality available in the package
Plot
Plot (path:str)
Plotting module
Type | Details | |
---|---|---|
path | str | path to embeddings |
Plot.get_normalized
Plot.get_normalized ()
Returns the normalized ssms
Plot.get_raw_ssms
Plot.get_raw_ssms ()
Returns the raw ssms
Plot.get_standardized
Plot.get_standardized ()
Returns the standardized ssms
= Plot(e/'A_Modest_Proposal_cleaned') plotter
'_', ' ') plotter.path.stem.replace(
'A Modest Proposal cleaned'
plotter
This object contains the path to `/mnt/e/A_Modest_Proposal_cleaned`
# d = plotter.get_normalized()
= plotter.get_standardized() d
for k, v in d.items():
print(v.shape)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
(68, 68)
d.keys()
dict_keys(['DeCLUTR Base', 'DeCLUTR Small', 'DistilBERT', 'InferSent FastText', 'InferSent GloVe', 'MiniLM', 'MPNet', 'RoBERTa', 'USE', 'XLM'])
0, -1, True) plotter.get_sectional_ssms(
Done plotting A Modest Proposal DeCLUTR Base.png
Done plotting A Modest Proposal DeCLUTR Small.png
Done plotting A Modest Proposal DistilBERT.png
Done plotting A Modest Proposal InferSent FastText.png
Done plotting A Modest Proposal InferSent GloVe.png
Done plotting A Modest Proposal MiniLM.png
Done plotting A Modest Proposal MPNet.png
Done plotting A Modest Proposal RoBERTa.png
Done plotting A Modest Proposal USE.png
Done plotting A Modest Proposal XLM.png
<Figure size 432x288 with 0 Axes>
plotter.create_ssms()
Done plotting A Modest Proposal DeCLUTR Small.png
Done plotting A Modest Proposal RoBERTa.png
Done plotting A Modest Proposal InferSent GloVe.png
Done plotting A Modest Proposal InferSent FastText.png
Done plotting A Modest Proposal DistilBERT.png
Done plotting A Modest Proposal MPNet.png
Done plotting A Modest Proposal USE.png
Done plotting A Modest Proposal DeCLUTR Base.png
<Figure size 432x288 with 0 Axes>
class Foo:
def __init__(self, i):
self.i = i
def __repr__(self):
return f'Init value in i is {self.i}'
def __str__(self):
return f'idk what this does'
= Foo(5) x
x
Init value in i is 5
print(x)
idk what this does