SyntacticPlusW2VModel
- class mowl.models.SyntacticPlusW2VModel(*args, **kwargs)[source]
Bases:
SyntacticModel
Model that combines corpus generation with Word2Vec training.
Added in version 0.2.0.
Attributes Summary
Returns a dictionary with class names as keys and class embeddings as values.
Returns the evaluation model.
Returns a dictionary with individual names as keys and individual embeddings as values.
Returns a dictionary with object property names as keys and object property embeddings as values.
Methods Summary
add_axioms
(*axioms)This method adds axioms to the dataset contained in the model and reorders the embedding information for each entity accordingly.
from_pretrained
(model)This method loads a pretrained model from a file.
set_w2v_model
(*args, **kwargs)This method sets the
gensim.models.word2vec.Word2Vec
model to be used in the syntactic model.train
([epochs])Triggers the Word2Vec training process.
Attributes Documentation
- class_embeddings
- evaluation_model
- individual_embeddings
- object_property_embeddings
Methods Documentation
- add_axioms(*axioms)[source]
This method adds axioms to the dataset contained in the model and reorders the embedding information for each entity accordingly. New entites are initalized with random embedding.
- Parameters:
axioms (org.semanticweb.owlapi.model.OWLAxiom) – Axioms to be added to the dataset.
Added in version 0.2.0.
- from_pretrained(model)[source]
This method loads a pretrained model from a file.
- Parameters:
file_name (str) – Path to the pretrained model file.
Added in version 0.2.0.
- set_w2v_model(*args, **kwargs)[source]
This method sets the
gensim.models.word2vec.Word2Vec
model to be used in the syntactic model.