abdulfatir / abdulfatir/twitter-sentiment-analysis

ValueError: invalid literal for int() with base 10: 'label'

Aberta
#16 7 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
1.7k
Forks
601
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Preprocessing still doesn't happen since there is an error in this line:
positive = int(line[:line.find(',')])

Here is the warning I get: ValueError: invalid literal for int() with base 10: 'label'

I looked up how to fix this and it looks like the string cannot be converted to int, so I tried int(float(...)) but didn't work

Any ideas?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Look at the preprocessing code where the line is parsed; the error suggests the first token is 'label' not a number. Check the data file format and the split logic. The fix likely involves handling the header row or adjusting the string slicing. Run the preprocessing script to see the exact line causing the error.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Domínio
machine-learning
Tipo de issue
Bug
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.