Delete, Retrieve, Generate: A Simple Approach to Sentiment and Style Transfer
Paper โข 1804.06437 โข Published
How to use rajistics/informal_formal_style_transfer with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("rajistics/informal_formal_style_transfer")
model = AutoModelForSeq2SeqLM.from_pretrained("rajistics/informal_formal_style_transfer")A Neural Language Style Transfer framework to transfer natural language text smoothly between fine-grained language styles like formal/casual. The original model is at https://github.com/PrithivirajDamodaran/Styleformer.
[Casual] I am quitting my job
[Formal] I will be stepping down from my job.
----------------------------------------------------------------------------------------------------
[Casual] Jimmy is on crack and can't trust him
[Formal] Jimmy is a crack addict I cannot trust him
----------------------------------------------------------------------------------------------------
[Casual] What do guys do to show that they like a gal?
[Formal] What do guys do to demonstrate their affinity for women?
----------------------------------------------------------------------------------------------------
[Casual] i loooooooooooooooooooooooove going to the movies.
[Formal] I really like to go to the movies.