tagger.info() cannot read multi-line matrices
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 38/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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))
- Lingua principale
- Python
- Stelle
- 774
- Fork
- 223
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scrapinghub/python-crfsuite
-
no wheels for python 3.14Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
scrapinghub/python-crfsuite#167 · 2 commenti · 2 reazioni ·
-
CRFsuite training too slowAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
scrapinghub/python-crfsuite#142 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
scrapinghub/python-crfsuite#129 · 1 commento · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
scrapinghub/python-crfsuite#119 · 1 commento · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
scrapinghub/python-crfsuite#114 ·
Tutte le issue di scrapinghub/python-crfsuite
Issue simili
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount dueForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 79/100
developmentseed/titiler-covjson#164 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
awslabs/visual-asset-management-system#2164 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
MakazhanAlpamys/Soup#3589 ·
I maintainer di solito rispondono entro 1 giorno
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno