mean opinion score
Version 0.0.2
根据“ Ribeiro,F。,F.,Florêncio,D.,Zhang,C。和Seltzer,C。&Seltzer,M.(2011)。crowdmos:2011年:一种均值评分评分研究的方法,用于计算平均意见评分(MOS)和95%置信区间(MOS)和95%置信区间(CI)(CI)的图书馆。为了确定顺式,作者使用了带有变量的双向随机效应模型:内在句子质量的多样性,评估者偏好的多样性和主观不确定性。
pip install mean-opinion-score --user import numpy as np
from mean_opinion_score import get_ci95 , get_ci95_default , get_mos
_ = np . nan
ratings = np . array ([
# columns represent sentences
[ 4 , 5 , _ , 4 , _ , 3 ], # rater 1
[ 4 , 4 , 4 , 5 , _ , 4 ], # rater 2
[ _ , 3 , 5 , 4 , _ , 1 ], # rater 3
[ _ , _ , _ , _ , _ , _ ], # rater 4
])
mos = get_mos ( ratings )
ci = get_ci95 ( ratings )
ci_default = get_ci95_default ( ratings )
print ( f"MOS: { mos :.2f } ± { ci :.4f } " )
print ( f"MOS: { mos :.2f } ± { ci_default :.4f } " )
# MOS: 3.85 ± 1.3316
# MOS: 3.85 ± 0.5579 numpyscipy 如果您注意到错误,请随时打开问题。
# update
sudo apt update
# install Python 3.6, 3.7, 3.8, 3.9, 3.10 & 3.11 for ensuring that tests can be run
sudo apt install python3-pip
python3.6 python3.6-dev python3.6-distutils python3.6-venv
python3.7 python3.7-dev python3.7-distutils python3.7-venv
python3.8 python3.8-dev python3.8-distutils python3.8-venv
python3.9 python3.9-dev python3.9-distutils python3.9-venv
python3.10 python3.10-dev python3.10-distutils python3.10-venv
python3.11 python3.11-dev python3.11-distutils python3.11-venv
# install pipenv for creation of virtual environments
python3.11 -m pip install pipenv --user
# check out repo
git clone https://github.com/stefantaubert/mean-opinion-score.git
cd mean-opinion-score
# create virtual environment
python3.11 -m pipenv install --dev # first install the tool like in "Development setup"
# then, navigate into the directory of the repo (if not already done)
cd mean-opinion-score
# activate environment
python3.11 -m pipenv shell
# run tests
tox测试结果输出的最终线:
py36: OK
py37: OK
py38: OK
py39: OK
py310: OK
py311: OK
congratulations :)
麻省理工学院许可证
MOS和CI计算取自:
由德意志福申格林斯(Deutsche Forschungsgemeinschaft)资助(德国研究基金会DFG) - 项目-ID 416228727 - CRC 1410。
如果要引用此回购,则可以使用GitHub生成的此Bibtex-Entry(请参阅大约=>引用此存储库)。
Taubert, S. (2023). mean-opinion-score (Version 0.0.2) [Computer software]. https://doi.org/10.5281/zenodo.8238259