Generating an ItemSequence with tuples instead of dictionaries

Abierto
#76 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

Start by reading the ItemSequence implementation and tracing how feature dictionaries are converted into ItemSequence objects. Check how tuple input could preserve feature names and values while reducing memory use, then identify the relevant tests for sequence construction. Done means tuple input is supported and existing dictionary behavior remains covered.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Would it be possible to extend the functionality of ItemSequence to allow the use of tuples. Python dictionaries have an incredible memory overhead and when using an extensive feature set of thousands of features the feature dictionaries alone can take up a lot of memory. Python dictionaries inherently are memory costly so that they have fast look up times. After looking through your code you are just using dictionaries as a store for the key/value information for features which are eventually converted into ItemSequence objects. A more optimal data structure in terms of memory would be a tuple with the first element as the feature name and the second as the feature value.

Let me know your thoughts. I think it would be a big optimisation to shift from dictionaries towards tuples for large feature sets.

Lenguaje dominante
Python
Estrellas
774
Forks
223
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de scrapinghub/python-crfsuite

Todos los issues de scrapinghub/python-crfsuite

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.