language-detection

Language detection for short string in a user content generated context

Language detection for short string in a user content generated context Question: I have some question about the detection of short string. I need to detect the language of text sent in a chat, and I am faced with 2 problems: the lenght of the message the errors that may be in it and the …

Total answers: 2

How to detect the language used in a column and put it in a new column?

How to detect the language used in a column and put it in a new column? Question: I have the following df: df = pd.DataFrame({ ‘user’: [‘Id159’, ‘Id758’, ‘Id146’, ‘Id477’, ‘Id212’, ‘Id999’], ‘comment’ : ["I inboxed you", ‘123’, 123, ‘je suis fatigué’, "j’aime", ‘ما نوع الجهاز بالضبط’] }) It has the following display: user comment …

Total answers: 3

How do I fix ValueError when doing nlp.add_pipe(LanguageDetector(), name='language_detector', last=True) with spacy 3

How do I fix ValueError when doing nlp.add_pipe(LanguageDetector(), name='language_detector', last=True) with spacy 3 Question: Every time I run the following code I found on Kaggle, I get ValueError. This is because of new version v3 of SpaCy: import scispacy import spacy import en_core_sci_lg from spacy_langdetect import LanguageDetector nlp = en_core_sci_lg.load(disable=["tagger", "ner"]) nlp.max_length = 2000000 nlp.add_pipe(LanguageDetector(), …

Total answers: 2