Views
No views yet
flaubert/flaubert_base_cased as its inital checkpoint. It obtained 13.20% CER (lower is better) in the MEDIA test set, in our Interspeech 2023 publication, using Kaldi ASR transcriptions.vpelloin/MEDIA_NLU-flaubert_base_cased: MEDIA NLU model trained using flaubert/flaubert_base_cased. Obtains 13.20% CER on MEDIA test.vpelloin/MEDIA_NLU-flaubert_base_uncased: MEDIA NLU model trained using flaubert/flaubert_base_uncased. Obtains 12.40% CER on MEDIA test.vpelloin/MEDIA_NLU-flaubert_oral_ft: MEDIA NLU model trained using nherve/flaubert-oral-ft. Obtains 11.98% CER on MEDIA test.vpelloin/MEDIA_NLU-flaubert_oral_mixed: MEDIA NLU model trained using nherve/flaubert-oral-mixed. Obtains 12.47% CER on MEDIA test.vpelloin/MEDIA_NLU-flaubert_oral_asr: MEDIA NLU model trained using nherve/flaubert-oral-asr. Obtains 12.43% CER on MEDIA test.vpelloin/MEDIA_NLU-flaubert_oral_asr_nb: MEDIA NLU model trained using nherve/flaubert-oral-asr_nb. Obtains 12.24% CER on MEDIA test.1from transformers import pipeline
2
3generator = pipeline(
4 model="vpelloin/MEDIA_NLU-flaubert_base_cased",
5 task="token-classification"
6)
7
8sentences = [
9 "je voudrais réserver une chambre à paris pour demain et lundi",
10 "d'accord pour l'hôtel à quatre vingt dix euros la nuit",
11 "deux nuits s'il vous plait",
12 "dans un hôtel avec piscine à marseille"
13 ]
14
15for sentence in sentences:
16 print([(tok['word'], tok['entity']) for tok in generator(sentence)])1from transformers import (
2 AutoTokenizer,
3 AutoModelForTokenClassification
4)
5tokenizer = AutoTokenizer.from_pretrained(
6 "vpelloin/MEDIA_NLU-flaubert_base_cased"
7)
8model = AutoModelForTokenClassification.from_pretrained(
9 "vpelloin/MEDIA_NLU-flaubert_base_cased"
10)
11
12sentences = [
13 "je voudrais réserver une chambre à paris pour demain et lundi",
14 "d'accord pour l'hôtel à quatre vingt dix euros la nuit",
15 "deux nuits s'il vous plait",
16 "dans un hôtel avec piscine à marseille"
17 ]
18inputs = tokenizer(sentences, padding=True, return_tensors='pt')
19outputs = model(**inputs).logits
20print([
21 [model.config.id2label[i] for i in b]
22 for b in outputs.argmax(dim=-1).tolist()
23])@inproceedings{pelloin22_interspeech,
author={Valentin Pelloin and Franck Dary and Nicolas Hervé and Benoit Favre and Nathalie Camelin and Antoine LAURENT and Laurent Besacier},
title={ASR-Generated Text for Language Model Pre-training Applied to Speech Tasks},
year=2022,
booktitle={Proc. Interspeech 2022},
pages={3453--3457},
doi={10.21437/Interspeech.2022-352}
}