french

NLTK word_tokenize on French text is not woking properly

…衆ロ難τιáo~ 提交于 2019-12-21 17:38:43
问题 I'm trying to use NLTK word_tokenize on a text in French by using : txt = ["Le télétravail n'aura pas d'effet sur ma vie"] print(word_tokenize(txt,language='french')) it should print: ['Le', 'télétravail', 'n'','aura', 'pas', 'd'','effet', 'sur', 'ma', 'vie','.'] But I get: ['Le', 'télétravail', "n'aura", 'pas', "d'effet", 'sur', 'ma', 'vie','.'] Does anyone know why it's not spliting tokens properly in French and how to overcome this (and other potential issues) when doing NLP in French? 回答1

NLTK word_tokenize on French text is not woking properly

走远了吗. 提交于 2019-12-04 11:15:06
I'm trying to use NLTK word_tokenize on a text in French by using : txt = ["Le télétravail n'aura pas d'effet sur ma vie"] print(word_tokenize(txt,language='french')) it should print: ['Le', 'télétravail', 'n'','aura', 'pas', 'd'','effet', 'sur', 'ma', 'vie','.'] But I get: ['Le', 'télétravail', "n'aura", 'pas', "d'effet", 'sur', 'ma', 'vie','.'] Does anyone know why it's not spliting tokens properly in French and how to overcome this (and other potential issues) when doing NLP in French? I don't think there's an explicit French model for word_tokenize (which is the modified treebank tokenizer

How to POS_TAG a french sentence?

跟風遠走 提交于 2019-12-03 14:53:18
问题 I'm looking for a way to pos_tag a French sentence like the following code is used for English sentences: def pos_tagging(sentence): var = sentence exampleArray = [var] for item in exampleArray: tokenized = nltk.word_tokenize(item) tagged = nltk.pos_tag(tokenized) return tagged 回答1: The NLTK doesn't come with pre-built resources for French. I recommend using the Stanford tagger, which comes with a trained French model. This code shows how you might set up the nltk for use with Stanford's

How to POS_TAG a french sentence?

冷暖自知 提交于 2019-12-03 04:47:08
I'm looking for a way to pos_tag a French sentence like the following code is used for English sentences: def pos_tagging(sentence): var = sentence exampleArray = [var] for item in exampleArray: tokenized = nltk.word_tokenize(item) tagged = nltk.pos_tag(tokenized) return tagged The NLTK doesn't come with pre-built resources for French. I recommend using the Stanford tagger , which comes with a trained French model. This code shows how you might set up the nltk for use with Stanford's French POS tagger. Note that the code is outdated (and for Python 2), but you could use it as a starting point.

Why can't my program compile under Windows 7 in French? [closed]

前提是你 提交于 2019-12-02 23:58:16
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I'm running Windows 7 French and I'm trying to compile this really basic program, but Visual Studio is being stubborn and refuses to

Why can't my program compile under Windows 7 in French? [closed]

断了今生、忘了曾经 提交于 2019-12-02 13:46:40
I'm running Windows 7 French and I'm trying to compile this really basic program, but Visual Studio is being stubborn and refuses to comply. I also tried compiling it with both GCC 4.7 and Clang trunk on Coliru and I get more or less the same errors (output is below the code), though I think Coliru runs on an English OS so I wouldn't expect it to work anyway. What am I doing wrong? And how can I fix it? Code #inclure <iostream> ent principal(ent argn, ent** argm) // entier, nombre d'arguments, valeur des arguments { std::cendehors << "Bonjour le monde!\n"; renvoi SORTIE_SUCCÈS; } Output