小编Yas*_*ash的帖子

如何使用Apache Benchmark(ab)登录站点

我在Ubuntu平台上运行基于php的Web应用程序.我想对1000个并发用户执行负载测试以进行登录过程.(当提供正确的用户名和密码时,它将被定向到主页).

我正在使用Apache Benchmark(ab)进行负载测试.我使用此命令单独加载登录页面.

    ab -n 1000 -c 1000 http://localhost/etsp/
Run Code Online (Sandbox Code Playgroud)

如何扩展此命令以测试登录过程?我的意思是,有没有办法为此提供用户名和密码?

任何提示都将受到高度赞赏.

apache benchmarking load-testing

9
推荐指数
1
解决办法
1万
查看次数

评估NLTK中的POS标签

我想使用文本文件作为输入来评估NLTK中的不同POS标签.

举个例子,我将采用Unigram标记器.我已经找到了如何使用棕色语料库评估Unigram标签.

from nltk.corpus import brown
import nltk

brown_tagged_sents = brown.tagged_sents(categories='news')
brown_sents = brown.sents(categories='news')
# We train a UnigramTagger by specifying tagged sentence data as a parameter
# when we initialize the tagger.
unigram_tagger = nltk.UnigramTagger(brown_tagged_sents)
print(unigram_tagger.tag(brown_sents[2007]))
print(unigram_tagger.evaluate(brown_tagged_sents))
Run Code Online (Sandbox Code Playgroud)

它产生如下输出.

[('Various', 'JJ'), ('of', 'IN'), ('the', 'AT'), ('apartments', 'NNS'), ('are', 'BER'), ('of', 'IN'), ('the', 'AT'), ('terrace', 'NN'), ('type', 'NN'), (',', ','), ('being', 'BEG'), ('on', 'IN'), ('the', 'AT'), ('ground', 'NN'), ('floor', 'NN'), ('so', 'QL'), ('that', 'CS'), ('entrance', 'NN'), ('is', 'BEZ'), ('direct', 'JJ'), ('.', …
Run Code Online (Sandbox Code Playgroud)

python nlp linguistics nltk pos-tagger

2
推荐指数
1
解决办法
1963
查看次数