Skip to content

Releases: rubingshen/AugmentedSocialScientist

v2.2.1

30 Oct 13:36
Compare
Choose a tag to compare

Change model saving pattern: now existing folders will overwritten

v2.2.0

04 Oct 20:51
Compare
Choose a tag to compare

add self.load_model() method to load a locally saved model

v2.1.0

01 Aug 13:35
Compare
Choose a tag to compare

add a parameter (add_special_tokens: bool) to encode

v2.0.2

01 Aug 13:28
Compare
Choose a tag to compare

add type hints

v2.0.1

28 Jul 16:23
c84c895
Compare
Choose a tag to compare

Fix bug for "unexpected argument model_name" when using a custom model from hugging face

New release v2

28 Jul 15:25
dd02f9d
Compare
Choose a tag to compare

The package is rewritten in an object-oriented way for more readability, extensibility and flexibility.

  1. All models are grouped together in the module AugmentedSocialScientist.models

To use a model (see README for the list)

from AugmentedSocialScientist.models import Bert

bert = Bert()  #instanciation

Everything else remains unchanged for users to train a model: bert.encode() to preprocess data, bert.run_training() to train, validate and save a model, bert.predict_with_model() to make predictions.

  1. Flexibility
from AugmentedSocialScientist.models import Bert

bert = Bert(model_name="DJSammy/bert-base-danish-uncased_BotXO-ai") 
  • Users can now set their own device to use, by providing a custom a torch.Device object to the device argument when instantiating the model.
from AugmentedSocialScientist.models import Bert

bert = Bert(device=...)  #your own device
  1. The input classification labels can also be textual labels now. They will be automatically converted to the corresponding label ids (integers starting from 0) by the method encode(). The dictionary of labels {label_name:label_id} will be printed during the preprocessing and saved to the attribute self.dict_labels.

  2. All dependancies on tensorflow and keras are removed.

New languages

23 Jul 23:35
b30304c
Compare
Choose a tag to compare

Add models for other languages:

  • arabic_bert for Arabic;
  • chinese_bert for Chinese;
  • german_bert for German;
  • hindi_bert for Hindi;
  • italian_bert for Italian;
  • portuguese_bert for Portuguese;
  • russian_bert for Russian;
  • spanish_bert for Spanish;
  • swedish_bert for Swedish.

v1.0.1

14 Jul 21:26
2a27f99
Compare
Choose a tag to compare
Update setup.py