tagger.info() cannot read multi-line matrices
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 38/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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))
- 主要言語
- Python
- スター
- 774
- フォーク
- 223
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scrapinghub/python-crfsuite のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
scrapinghub/python-crfsuite#167 · コメント 2 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
scrapinghub/python-crfsuite#142 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
scrapinghub/python-crfsuite#129 · コメント 1 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
scrapinghub/python-crfsuite#119 · コメント 1 件 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
scrapinghub/python-crfsuite#114 ·
scrapinghub/python-crfsuite の issue をすべて見る
似ている issue
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount due対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 79/100
developmentseed/titiler-covjson#164 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
awslabs/visual-asset-management-system#2164 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
MakazhanAlpamys/Soup#3589 ·
メンテナーはふだん 1 日以内に返信
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信