标签: python-crfsuite

Python CRFsuite 可以并行化吗?

是否可以并行化 python CRFSuite(https://github.com/tpeng/python-crfsuite)?我认为 CRF++ 支持并行化,所以我猜想也必须有一些钩子来启用 CRFsuite 的并行化。

python crf python-crfsuite

5
推荐指数
1
解决办法
727
查看次数

如何使用词嵌入作为 CRF (sklearn-crfsuite) 模型训练的特征

我想开发一个 NER 模型,我想使用词嵌入特征来训练 CRF 模型。代码在没有词嵌入特征的情况下完美运行,但是当我插入嵌入作为 CRF 训练的特征时,收到错误消息。这是我的代码片段的一部分:

%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('ggplot')

from itertools import chain

import nltk
import sklearn
import scipy.stats
from sklearn.metrics import make_scorer
#from sklearn.cross_validation import cross_val_score
#from sklearn.grid_search import RandomizedSearchCV

import sklearn_crfsuite
from sklearn_crfsuite import scorers
from sklearn_crfsuite import metrics
import pickle
from gensim.models import KeyedVectors
import numpy as np
# Load vectors directly from the file
model1 = KeyedVectors.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True) ### Loading pre-trainned word2vec model
### Embedding function 
def get_features(word):
    word=word.lower()
    vectors=[]
    try: …
Run Code Online (Sandbox Code Playgroud)

python word-embedding python-crfsuite crfsuite

4
推荐指数
1
解决办法
1860
查看次数

适用于 Ubuntu 的 python-crfsuite

我想在 Ubuntu 中安装 python-crfsuite。当我使用 pip 安装时,我收到了一些警告并且

在 python-crfsuite 的安装记录中找不到 .egg-info 目录

当我在 python 中导入 crfutils 时,它说找不到模块。可能是什么问题,或者在 Linux 系统中是不可能的?

python pip crf python-crfsuite

3
推荐指数
1
解决办法
926
查看次数

标签 统计

python ×3

python-crfsuite ×3

crf ×2

crfsuite ×1

pip ×1

word-embedding ×1