French Verbs Transformation#250
Conversation
msobrevillac
left a comment
There was a problem hiding this comment.
I think this is an interesting transformation for French. It is at an early stage but it is promising.
|
|
||
| This transformation change some words with synonyms according to if their POS tag is a VERB for simple french sentences. It requires Spacy_lefff (an extention of spacy for french POS and lemmatizing) and nltk package with the open multilingual wordnet dictionary. | ||
|
|
||
| Authors : Lisa Barthe and Louanes Hamla from Fablab by Inetum in Paris |
There was a problem hiding this comment.
Please, add email. Maybe, you can use this style:
- Author name:
- Author email:
- Author Affiliation:
| TaskType.TEXT_TAGGING, | ||
| ] | ||
| languages = ["fr"] | ||
|
|
| languages = ["fr"] | ||
|
|
||
| def __init__(self, seed=0, max_outputs=1): | ||
| super().__init__(seed, max_outputs=max_outputs) |
There was a problem hiding this comment.
You don't use the param max_outputs. It means that you are generating all possible candidates?
| return POSTagger() | ||
|
|
||
|
|
||
| nlp = spacy.load('fr_core_news_md') |
| from spacy.language import Language | ||
| from nltk.corpus import wordnet | ||
| import nltk | ||
| nltk.download('omw') |
There was a problem hiding this comment.
Maybe you might add the nltk in a similar way to spacy in initialize.py
| "sentence": "J'ai enfin pu faire remorquer la voiture !" | ||
| }, | ||
| "outputs": [{ | ||
| "sentence": "J'ai enfin pu faire rouler la voiture !" |
There was a problem hiding this comment.
I am not sure if you only change one verb per instance, i.e., you only generate one additional sentence per instance?
|
Hi, thanks for the submission! Two questions: (i) does the substitution only affect infinitive verbs? And if so, is there a way to overcome this limitation? (ii) do we have an idea of the coverage of the lexicon? Another comment: is this transformation covered by https://github.com/GEM-benchmark/NL-Augmenter/pull/234/files? (although the latter is for English) Should there be just one transformation for Verbs, Nouns #247 and Adjectives #249, since the method seems to be the same? The transformation could be called "Lexical susbstitutions for French". |
|
@Louanes1 ping |
|
Hi, |
Hi @Louanes1 : You've already merged the 3 PRs into one right? If so, we can close this PR. Let me know. |
No description provided.