tagger.info() cannot read multi-line matrices
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 38/100
Línea de trabajo
Read pycrfsuite/_dumpparser.py, especially the attribute parsing logic at lines 72–74, and reproduce the failure with a CRF feature containing a multi-line NumPy matrix. Check how tagger.info() output is parsed and compare it with the matrix representation. Done means matrix features can be parsed without the reported missing-regex-group error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Not sure this is a bug, or a feature request, but I shall still write it down as more people would definitely be experiencing this.
When the features of a crf also contain numpy matrices, like the word2vec vector of a word; the tagger.info() is not being able to recognize them, as the regex pattern is not recognized. The error thrown due to the unavailability of a detected regex group looks like this:
Traceback (most recent call last):
File "test_dumpparser.py", line 8, in <module>
parser.feed(line.decode('utf8'))
File "/Library/Python/2.7/site-packages/pycrfsuite/_dumpparser.py", line 62, in feed
getattr(self, 'parse_%s' % self.state)(line)
File "/Library/Python/2.7/site-packages/pycrfsuite/_dumpparser.py", line 74, in parse_ATTRIBUTES
self.result.attributes[m.group(2)] = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
This is due to the parsing logic in the _dumpparser.py file.
A solution for that would be to encode the matrix and then, pass it into the CRF model as a feature.
(base64.b64encode(narray))
- 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de scrapinghub/python-crfsuite
-
no wheels for python 3.14Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
scrapinghub/python-crfsuite#167 · 2 comentarios · 2 reacciones ·
-
CRFsuite training too slowAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
scrapinghub/python-crfsuite#142 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
scrapinghub/python-crfsuite#129 · 1 comentario · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
scrapinghub/python-crfsuite#119 · 1 comentario · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
scrapinghub/python-crfsuite#114 ·
Todos los issues de scrapinghub/python-crfsuite
Issues similares
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
MakazhanAlpamys/Soup#3589 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/clickhouse-connect#1266 ·
Los mantenedores suelen responder en 1 día
-
AutoGrowth: new time column nameAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
biosustain/growthcurves_app#89 ·
Los mantenedores suelen responder en 1 día
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
canonical/loki-k8s-operator#695 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día