小编san*_*ang的帖子

更改bootstrap中活动的类的颜色

我正在尝试更改我的HTML代码中活动类的颜色.我正在创建导航侧边栏.这是我的代码:

<div class="col-sm-2">
                <ul class="nav nav-pills nav-stacked nav-static"> <!--stacked untuk jadi vertical -->
                    <li class="active"><a>Create Case</a></li>
                    <li><a href="wf-listofcase.php">List of cases</a></li>
                    <li><a href="linksofapps.html">Links of Apps</a></li>
                </ul>
    </div>
Run Code Online (Sandbox Code Playgroud)

如何改变它的颜色?谢谢你..

html css background-color twitter-bootstrap

7
推荐指数
2
解决办法
4万
查看次数

在NLTK中没有pos_tag的ne_chunk

我正试图在nltk中使用ne_chunk和pos_tag来判断一个句子.

from nltk import tag
from nltk.tag import pos_tag
from nltk.tree import Tree
from nltk.chunk import ne_chunk

sentence = "Michael and John is reading a booklet in a library of Jakarta"
tagged_sent = pos_tag(sentence.split())

print_chunk = [chunk for chunk in ne_chunk(tagged_sent) if isinstance(chunk, Tree)]

print print_chunk
Run Code Online (Sandbox Code Playgroud)

这就是结果:

[Tree('GPE', [('Michael', 'NNP')]), Tree('PERSON', [('John', 'NNP')]), Tree('GPE', [('Jakarta', 'NNP')])]
Run Code Online (Sandbox Code Playgroud)

我的问题是,是否有可能不包括pos_tag(如上面的NNP)并且仅包括Tree'GPE','PERSON'?什么'GPE'的意思?

提前致谢

python tags tree chunking nltk

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

标签 统计

background-color ×1

chunking ×1

css ×1

html ×1

nltk ×1

python ×1

tags ×1

tree ×1

twitter-bootstrap ×1