Skip to content

Releases: bonejay/neurelease

Release list

NeuRelease 0.1.1

Choose a tag to compare

@bonejay bonejay released this 11 Sep 14:23

A fast neural parser for torrent and release names. It reads a name, returns every field it
found with the span each was read from and a confidence, and classifies the work.

Try it in the browser — paste a name and watch it read.

pip install neurelease
from neurelease import Parser
Parser().parse("葬送のフリーレン 第28話 「また会ったときに恥ずかしいからね」 (1080p).mkv").to_dict()
# {'title': '葬送のフリーレン', 'absolute_episode': 28,
#  'episode_title': 'また会ったときに恥ずかしいからね', 'content': 'series', 'anime': True}

What it is

A character-level CNN feeding a Transformer encoder, 3.6 million parameters quantised to int8,
running on the CPU with AVX2, AVX-VNNI and AVX-512 kernels selected at load time by CPUID. No ML
runtime, no model download: the wheel is about 5 MB and contains the compiled library and the
weights. PCRE2 is the only dependency, linked statically.

Pattern parsers recognise known markers and guess the rest by position, so an ambiguous number or
word is settled the same way every time, right or wrong. This one decides from context. It is
trained on hundreds of thousands of labelled release names from a large torrent index, mostly
English, with German, Spanish, French, Italian, Russian, Chinese and Japanese names as well.

Measured against GuessIt

On 3,344 video validation names, both parsers normalised into one documented field contract:

Metric NeuRelease GuessIt 4.4.0
macro shared-field F1 97.57% 86.45%
exact on every applicable shared field 89.44% 51.44%
single name, one thread, via Python 2,446 µs 8,213 µs
batch, 4 workers, via Python 833 µs no batch API
GuessIt's 22 documented limitation cases 19/22 0/22
GuessIt's own regression corpus 683/859 804/859

That last row is not a typo. GuessIt's corpus is its own test suite, written to exercise its rules
and assuming every input is a video; this parser reads a single real name and classifies it before
assuming anything. The method, the per-field numbers and the scoring snapshot are in
docs/GUESSIT_COMPARISON.md.

Model version 3

The animated/live-action content kinds became two separate questions: the form of a work,
movie or series, and whether it is anime. A release name does not say whether something is
animated, and the old label was guesswork dressed as a field. Whether a work is anime the name does
announce, through titles, groups and conventions, and the model reads it at 96.50% accuracy through
the int8 runtime.

Wheels

Python 3.10+, tagged py3-none-<platform> because the library is loaded through ctypes.

Platform Wheel
Linux x86-64 manylinux_2_28
macOS, Apple Silicon macosx_11_0_arm64
Windows x86-64 win_amd64

Anywhere else, build from source: CMake 3.24+, a C++23 compiler.

MIT licensed. PCRE2's notice travels in every binary, in
THIRD_PARTY_NOTICES.md.