# Introduction
This project aims to create an open source music recommendation toolkit with an API-first
philiosophy. API-first means that user do no need to download a lot of data before they
can start working with Troi -- all the needed data should ideally live in online APIs, making
it very easy for someone to get started hacking on music recommendations.
To accomplish this goal, we, the MetaBrainz Foundation, have created and hosted a number of data-sets
that can be accessed as a part of this project. For instance, the more stable APIs are hosted on our
[Labs API page](https://labs.api.listenbrainz.org).
The ListenBrainz project offers a number of data sets:
1. Collaborative filtered recordings that suggest what recordings a user should listen to based on
their previous listening habits.
2. User statistics that were derived from users recent listening habits.
We will continue to build and host more datasets as time passes. If an API endpoint becomes useful to
a greater number of people we will elevate these API endpoints to officially supported endpoints
that we ensure are up to date on online at all times.
The project is named after [Deanna Troi](https://en.wikipedia.org/wiki/Deanna_Troi).
# Documentation
Full documentation for Troi is available at [troi.readthedocs.org](https://troi.readthedocs.org).
## Installation for end users
So far we've not uploaded Troi bundles to PyPi -- please use the installation instructions for developers
below.
## Installation for Development
**Linux and Mac**
```
virtualenv -p python3 .ve
source .ve/bin/activate
pip3 install -r requirements.txt -r requirements_test.txt
python3 -m troi.cli --help
```
**Windows**
```
virtualenv -p python .ve
.ve\Scripts\activate.bat
pip install -r requirements.txt -r requirements_test.txt
python -m troi.cli --help
```
## Basic commands
List available patches:
python -m troi.cli list
Generate a playlist using a patch:
python -m troi.cli playlist --print [patch-name]
If the patch requires arguments, running it with no arguments will print a usage statement, e.g.
$ python -m troi.cli playlist --print area-random-recordings
Usage: area-random-recordings [OPTIONS] AREA START_YEAR END_YEAR
Generate a list of random recordings from a given area.
AREA is a MusicBrainz area from which to choose tracks.
START_YEAR is the start year.
END_YEAR is the end year.
Options:
--help Show this message and exit.
## Running tests
```
python3 -m troi.cli test
python3 -m troi.cli test -v
python3 -m troi.cli test -v <file to test>
```
## Building Documentation
To build the documentation locally:
cd docs
pip install -r requirements.txt
make clean html
## References for the future path of Troi
Troi is a rather primitive tool at this point in time, but as the MetaBrainz projects gather more data, we can improve
how we generate playlists. A good overview of the technology and psychology behind playlists and recommendations, see:
* https://www.slideshare.net/BenFields/finding-a-path-through-the-juke-box-the-playlist-tutorial?utm_source=pocket_mylist
没有合适的资源?快使用搜索试试~ 我知道了~
一个推荐引擎游乐场,有望使播放音乐推荐变得容易。_Python_下载.zip
共87个文件
py:66个
rst:10个
txt:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 136 浏览量
2023-04-23
09:50:37
上传
评论
收藏 105KB ZIP 举报
温馨提示
一个推荐引擎游乐场,有望使播放音乐推荐变得容易。_Python_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
一个推荐引擎游乐场,有望使播放音乐推荐变得容易。_Python_下载.zip (87个子文件)
troi-recommendation-playground-main
setup.py 990B
.github
workflows
python-app.yml 750B
LICENSE 18KB
docker
endless.py 54B
docs
index.rst 3KB
make.bat 795B
Makefile 634B
patches.rst 2KB
entities.rst 2KB
conf.py 3KB
listenbrainz-logo.svg 19KB
installation.rst 795B
requirements.txt 130B
introduction.rst 3KB
dev
index.rst 1KB
user-guide.rst 1KB
elements
index.rst 1KB
musicbrainz.rst 2KB
listenbrainz.rst 4KB
troi
utils.py 2KB
__init__.py 11KB
tools
__init__.py 0B
area_lookup.py 810B
tests
test_area_lookup.py 789B
spotify_lookup.py 5KB
patch.py 2KB
tests
test_filters.py 11KB
test_utils.py 667B
test_entities.py 3KB
test_sorts.py 1KB
test_playlist.py 8KB
test_operations.py 8KB
listenbrainz
__init__.py 0B
dataset_fetcher.py 2KB
yim_user.py 977B
stats.py 4KB
tests
test_area_random_recordings.py 2KB
test_recs.py 2KB
test_stats.py 3KB
recs.py 3KB
area_random_recordings.py 2KB
user.py 529B
listens.py 4KB
feedback.py 2KB
musicbrainz
related_artist_credits.py 2KB
__init__.py 0B
recording_lookup.py 3KB
year_lookup.py 2KB
artist_credit_id_lookup.py 1KB
tests
test_recording_lookup.py 2KB
test_year_lookup.py 2KB
test_mbid_mapping.py 2KB
test_ac_id_lookup.py 1KB
test_related_artist_credits.py 2KB
test_genre_lookup.py 3KB
mbid_mapping.py 3KB
mbid_reader.py 856B
recording.py 530B
genre_lookup.py 3KB
internal
top_new_recordings_you_listened_to_for_year.py 3KB
top_sitewide_recordings_for_year.py 3KB
top_recordings_for_year.py 3KB
yim_patch_runner.py 3KB
README.md 235B
core.py 6KB
loops.py 3KB
patches
playlist_from_mbids.py 1KB
__init__.py 0B
new_jams.py 3KB
area_random_recordings.py 2KB
daily_jams.py 4KB
recs_to_playlist.py 4KB
playlist_from_listenbrainz.py 1KB
top_missed_recordings_for_year.py 6KB
world_trip.py 6KB
top_discoveries_for_year.py 2KB
weekly_flashback_jams.py 4KB
print_recording.py 5KB
operations.py 6KB
sorts.py 954B
playlist.py 19KB
cli.py 4KB
filters.py 13KB
requirements.txt 204B
.gitignore 83B
README.md 3KB
requirements_test.txt 28B
共 87 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功