Downloads · 30 days
0
aisingapore/unsupervised-feature-decomposition
unsupervised-feature-decomposition is a text classification model from aisingapore. Use it when you need a label for a piece of text. The card lists the license as gpl-3.0.
You can try out the model at SGNLP.<br / If you want to find out more information, please contact us at SGNLP-AISingapore.
Downloads · 30 days
0
Access
Public
Updated Feb 10, 2023
Repo size
50.4 MB
Likes
0
Public
Click a slice to open those files.
.bin25.2 MB · 100%
From the Hugging Face model README
You can try out the model at SGNLP.<br /> If you want to find out more information, please contact us at SGNLP-AISingapore.
Model Name: Unsupervised Domain Adaptation of a Pretrained Cross-Lingual Language
SGnlp is an initiative by AI Singapore's NLP Hub. They aim to bridge the gap between research and industry, promote translational research, and encourage adoption of NLP techniques in the industry. <br><br> Various NLP models, other than cross lingual cross domain are available in the python package. You can try them out at SGNLP-Demo | SGNLP-Github.
pip install sgnlp
For more full code guide, please refer to this documentation. <br> Alternatively, you can also try out the demo for Cross Lingual Cross Domain.
Example of Undersupervised Feature Decomposition (UFD) model (German language):
from sgnlp.models.ufd import UFDModelBuilder, UFDPreprocessor
# Instantiate model builder and preprocessor
model_builder = UFDModelBuilder(
source_domains=['books'],
target_languages=['de'],
target_domains=['dvd'])
preprocessor = UFDPreprocessor()
# Build pretrained model groups
model_groups = model_builder.build_model_group()
# Model predict ('books_de_dvd' model example)
instance = """Wolverine is BACK Der Film ist im Grunde wie alle Teile der X-Men für Comic-Fans auf jeden Fall ein muss.
Hugh Jackman spielt seine Rolle wie immer so gut was ich von den ein oder anderen Darsteller leider nicht
sagen kann. Story und Action sind aber genug Gründe um sich die Blu-ray zu kaufen."""
instance_features = preprocessor([instance])
output = model_groups['books_de_dvd'](**instance_features)
The training datasets can be retrieved from the following author's repository(github).