Pure Rust port of CRFsuite: a fast implementation of Conditional Random Fields (CRFs)

Overview

crfs-rs

CI codecov Crates.io docs.rs

Pure Rust port of CRFsuite: a fast implementation of Conditional Random Fields (CRFs)

Currently only support prediction, model training is not supported. For training you can use crfsuite-rs.

Installation

Add it to your Cargo.toml:

[dependencies]
crfs = "0.1"

Performance

Performance comparsion with CRFsuite on MacBook Pro (13-inch, M1, 2020) 16GB

$ cargo bench --bench crf_bench -- --output-format bencher
test tag/crfs ... bench:        2084 ns/iter (+/- 6)
test tag/crfsuite ... bench:        2957 ns/iter (+/- 9)

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

Comments
  • Update ouroboros requirement from 0.14.0 to 0.15.0 in /python

    Update ouroboros requirement from 0.14.0 to 0.15.0 in /python

    Updates the requirements on ouroboros to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @messense.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • Update pyo3 requirement from 0.15.0 to 0.16.0 in /python

    Update pyo3 requirement from 0.15.0 to 0.16.0 in /python

    Updates the requirements on pyo3 to permit the latest version.

    Release notes

    Sourced from pyo3's releases.

    PyO3 0.15.1

    This release is a set of bug fixes for some minor issues reported since PyO3 0.15's release. There are also some small additions for those storing PyIterator, PySequence, and PyMapping in Py smart pointers, and a PyTraceback type to ease interacting with Python tracebacks from Rust.

    For full details of all changes, see the CHANGELOG.

    Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:

    @​dansvo @​davidhewitt @​KRunchPL @​mejrs @​messense @​moriyoshi @​saidvandeklundert @​taiki-e

    Changelog

    Sourced from pyo3's changelog.

    [0.15.1] - 2021-11-19

    Added

    • Add implementations for Py::as_ref() and Py::into_ref() for Py<PySequence>, Py<PyIterator> and Py<PyMapping>. #1682
    • Add PyTraceback type to represent and format Python tracebacks. #1977

    Changed

    • #[classattr] constants with a known magic method name (which is lowercase) no longer trigger lint warnings expecting constants to be uppercase. #1969

    Fixed

    • Fix creating #[classattr] by functions with the name of a known magic method. #1969
    • Fix use of catch_unwind in allow_threads which can cause fatal crashes. #1989
    • Fix build failure on PyPy when abi3 features are activated. #1991
    • Fix mingw platform detection. #1993
    • Fix panic in __get__ implementation when accessing descriptor on type object. #1997

    [0.15.0] - 2021-11-03

    Packaging

    • pyo3's Cargo.toml now advertises links = "python" to inform Cargo that it links against libpython. #1819
    • Added optional anyhow feature to convert anyhow::Error into PyErr. #1822
    • Support Python 3.10. #1889
    • Added optional eyre feature to convert eyre::Report into PyErr. #1893
    • Support PyPy 3.8. #1948

    Added

    • Add PyList::get_item_unchecked and PyTuple::get_item_unchecked to get items without bounds checks. #1733
    • Support #[doc = include_str!(...)] attributes on Rust 1.54 and up. #1746
    • Add PyAny::py as a convenience for PyNativeType::py. #1751
    • Add implementation of std::ops::Index<usize> for PyList, PyTuple and PySequence. #1825
    • Add range indexing implementations of std::ops::Index for PyList, PyTuple and PySequence. #1829
    • Add PyMapping type to represent the Python mapping protocol. #1844
    • Add commonly-used sequence methods to PyList and PyTuple. #1849
    • Add as_sequence methods to PyList and PyTuple. #1860
    • Add support for magic methods in #[pymethods], intended as a replacement for #[pyproto]. #1864
    • Add abi3-py310 feature. #1889
    • Add PyCFunction::new_closure to create a Python function from a Rust closure. #1901
    • Add support for positional-only arguments in #[pyfunction]. #1925
    • Add PyErr::take to attempt to fetch a Python exception if present. #1957

    Changed

    • PyList, PyTuple and PySequence's APIs now accepts only usize indices instead of isize. #1733, #1802, #1803

    ... (truncated)

    Commits
    • eb5059a release: 0.15.1
    • 2f6ea2f Merge pull request #1999 from dansvo/guide-link-repair
    • d9a3f67 Fix broken relative markdown link in guide
    • e790d55 Merge pull request #1997 from davidhewitt/get-panic
    • 26ccc1a macros: fix panic in get implementation
    • 45059cb Merge pull request #1990 from davidhewitt/allow-threads-unwind
    • 1df68e8 allow_threads: switch from catch_unwind to guard pattern
    • 3e16a2a Merge pull request #1995 from gertjanvanzwieten/fix-pycounter
    • 8e41483 Merge pull request #1991 from messense/pypy-abi3
    • 9ae7e31 Merge pull request #1977 from davidhewitt/traceback-type
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • Update pyo3 requirement from 0.14.2 to 0.15.0 in /python

    Update pyo3 requirement from 0.14.2 to 0.15.0 in /python

    Updates the requirements on pyo3 to permit the latest version.

    Release notes

    Sourced from pyo3's releases.

    PyO3 0.15.0

    This release of PyO3 brings support for Python 3.10 and PyPy 3.8. In addition, new optional dependencies on anyhow and eyre have been added for easy integration of the popular error-handling libraries with Python code.

    A number of consistency improvements have been made to PyList, PyTuple and PySequence APIs. They now all exclusively use usize- based indexing, and now also support Rust's indexing operator.

    In this release #[pymethods] are now able to implement many magic methods such as __str__ and __repr__, removing the need for #[pyproto] macro implementations. For the 0.15 release series both #[pymethods] and #[pyproto] will be supported; #[pyproto] is expected to be deprecated in the future.

    For full details of all changes, see the CHANGELOG. For help with upgrading, see the migration guide.

    Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback.

    Changelog

    Sourced from pyo3's changelog.

    [0.15.0] - 2021-11-03

    Packaging

    • pyo3's Cargo.toml now advertises links = "python" to inform Cargo that it links against libpython. #1819
    • Added optional anyhow feature to convert anyhow::Error into PyErr. #1822
    • Support Python 3.10. #1889
    • Added optional eyre feature to convert eyre::Report into PyErr. #1893
    • Support PyPy 3.8. #1948

    Added

    • Add PyList::get_item_unchecked and PyTuple::get_item_unchecked to get items without bounds checks. #1733
    • Support #[doc = include_str!(...)] attributes on Rust 1.54 and up. #1746
    • Add PyAny::py as a convenience for PyNativeType::py. #1751
    • Add implementation of std::ops::Index<usize> for PyList, PyTuple and PySequence. #1825
    • Add range indexing implementations of std::ops::Index for PyList, PyTuple and PySequence. #1829
    • Add PyMapping type to represent the Python mapping protocol. #1844
    • Add commonly-used sequence methods to PyList and PyTuple. #1849
    • Add as_sequence methods to PyList and PyTuple. #1860
    • Add support for magic methods in #[pymethods], intended as a replacement for #[pyproto]. #1864
    • Add abi3-py310 feature. #1889
    • Add PyCFunction::new_closure to create a Python function from a Rust closure. #1901
    • Add support for positional-only arguments in #[pyfunction]. #1925
    • Add PyErr::take to attempt to fetch a Python exception if present. #1957

    Changed

    • PyList, PyTuple and PySequence's APIs now accepts only usize indices instead of isize. #1733, #1802, #1803
    • PyList::get_item and PyTuple::get_item now return PyResult<&PyAny> instead of panicking. #1733
    • PySequence::in_place_repeat and PySequence::in_place_concat now return PyResult<&PySequence> instead of PyResult<()>, which is needed in case of immutable sequences such as tuples. #1803
    • PySequence::get_slice now returns PyResult<&PySequence> instead of PyResult<&PyAny>. #1829
    • Deprecate PyTuple::split_from. #1804
    • Deprecate PyTuple::slice, new method PyTuple::get_slice added with usize indices. #1828
    • Deprecate FFI definitions PyParser_SimpleParseStringFlags, PyParser_SimpleParseStringFlagsFilename, PyParser_SimpleParseFileFlags when building for Python 3.9. #1830
    • Mark FFI definitions removed in Python 3.10 PyParser_ASTFromString, PyParser_ASTFromStringObject, PyParser_ASTFromFile, PyParser_ASTFromFileObject, PyParser_SimpleParseStringFlags, PyParser_SimpleParseStringFlagsFilename, PyParser_SimpleParseFileFlags, PyParser_SimpleParseString, PyParser_SimpleParseFile, Py_SymtableString, and Py_SymtableStringObject. #1830
    • #[pymethods] now handles magic methods similarly to #[pyproto]. In the future, #[pyproto] may be deprecated. #1864
    • Deprecate FFI definitions PySys_AddWarnOption, PySys_AddWarnOptionUnicode and PySys_HasWarnOptions. #1887
    • Deprecate #[call] attribute in favor of using fn __call__. #1929
    • Fix missing FFI definition _PyImport_FindExtensionObject on Python 3.10. #1942
    • Change PyErr::fetch to panic in debug mode if no exception is present. #1957

    Fixed

    • Fix building with a conda environment on Windows. #1873
    • Fix panic on Python 3.6 when calling Python::with_gil with Python initialized but threading not initialized. #1874
    • Fix incorrect linking to version-specific DLL instead of python3.dll when cross-compiling to Windows with abi3. #1880
    • Fix FFI definition for PyTuple_ClearFreeList incorrectly being present for Python 3.9 and up. #1887

    ... (truncated)

    Commits
    • 4774744 release: 0.15.0
    • 64df791 Merge pull request #1964 from PyO3/pymethods-args
    • 9ce363a guide: add hints for the signature of pymethods protos
    • 39d2b9d Merge pull request #1957 from davidhewitt/fetch-if-set
    • f801c19 err: add PyErr::take
    • 7b9ae8e Clean up Python documentation (#1963)
    • 0f92f28 Merge pull request #1958 from davidhewitt/pymethods-protos-arguments-cleanup
    • 6a3e1e7 macros: clean up protocol argument extraction a bit
    • bfe7086 Merge pull request #1954 from PyO3/feature-fix
    • 50df2c7 Merge pull request #1955 from PyO3/cargo-toml-deps
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @messense.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • Why Use Universal2 instead of aarch64?

    Why Use Universal2 instead of aarch64?

    opened by jkjetty 1
  • Update bstr requirement from 0.2.14 to 1.0.0

    Update bstr requirement from 0.2.14 to 1.0.0

    Updates the requirements on bstr to permit the latest version.

    Commits
    • 86ff47f 1.0.0
    • 6ec5f56 BREAKING: api: remove ByteSlice::copy_within_str
    • e6a7c57 ci: remove 'alloc,unicode' test
    • 72024a8 cargo: require 'std' when enabling 'unicode'
    • 6df1c9d unicode: add ASCII optimization for grapheme segmenter
    • 635e0f6 unicode: regenerate DFAs to make use of once_cell
    • 77105cf ci: add miri job
    • 2b1bd05 cargo: set rust-version to 1.60.0
    • 6beae06 api: add BString::new and make it const
    • fb46d55 1.0.0-pre.3
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update criterion requirement from 0.3.4 to 0.4.0

    Update criterion requirement from 0.3.4 to 0.4.0

    Updates the requirements on criterion to permit the latest version.

    Changelog

    Sourced from criterion's changelog.

    [0.4.0] - 2022-09-10

    Removed

    • The Criterion::can_plot function has been removed.
    • The Criterion::bench_function_over_inputs function has been removed.
    • The Criterion::bench_functions function has been removed.
    • The Criterion::bench function has been removed.

    Changed

    • HTML report hidden behind non-default feature flag: 'html_reports'
    • Standalone support (ie without cargo-criterion) feature flag: 'cargo_bench_support'
    • MSRV bumped to 1.57
    • rayon and plotters are optional (and default) dependencies.
    • Status messages ('warming up', 'analyzing', etc) are printed to stderr, benchmark results are printed to stdout.
    • Accept subsecond durations for --warm-up-time, --measurement-time and --profile-time.
    • Replaced serde_cbor with ciborium because the former is no longer maintained.
    • Upgrade clap to v3 and regex to v1.5.

    Added

    • A --discard-baseline flag for discarding rather than saving benchmark results.
    • Formal support for benchmarking code compiled to web-assembly.
    • A --quiet flag for printing just a single line per benchmark.
    • A Throughput::BytesDecimal option for measuring throughput in bytes but printing them using decimal units like kilobytes instead of binary units like kibibytes.

    Fixed

    • When using bench_with_input, the input parameter will now be passed through black_box before passing it to the benchmark.

    [0.3.6] - 2022-07-06

    Changed

    • MSRV bumped to 1.49
    • Symbol for microseconds changed from ASCII 'us' to unicode 'µs'
    • Documentation fixes
    • Clippy fixes

    [0.3.5] - 2021-07-26

    Fixed

    • Corrected Criterion.toml in the book.
    • Corrected configuration typo in the book.

    Changed

    • Bump plotters dependency to always include a bug-fix.
    • MSRV bumped to 1.46.

    ... (truncated)

    Commits
    • 5e27b69 Merge branch 'version-0.4'
    • 4d6d69a Increment version numbers.
    • 935c632 Add Throughput::BytesDecimal. Fixes #581.
    • f82ce59 Remove critcmp code (it belongs in cargo-criterion) (#610)
    • a18d080 Merge branch 'master' into version-0.4
    • f9c6b8d Merge pull request #608 from Cryptex-github/patch-1
    • 8d0224e Fix html report path
    • 2934163 Add missing black_box for bench_with_input parameters. Fixes 566.
    • dfd7b65 Add duplicated benchmark ID to assertion message.
    • ce8259e Bump criterion-plot version number.
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update pyo3 requirement from 0.16.5 to 0.17.1 in /python

    Update pyo3 requirement from 0.16.5 to 0.17.1 in /python

    Updates the requirements on pyo3 to permit the latest version.

    Release notes

    Sourced from pyo3's releases.

    PyO3 0.17.1

    This release contains some minor bug fixes for PyO3 0.17.0. In particular the new PyDictItems, PyDictKeys and PyDictValues types are actually accessible!

    Thanks to @​davidhewitt, @​messense and @​PrettyWood for the fixes.

    Changelog

    Sourced from pyo3's changelog.

    [0.17.1] - 2022-08-28

    Fixed

    • Fix visibility of PyDictItems, PyDictKeys, and PyDictValues types added in PyO3 0.17.0.
    • Fix compile failure when using #[pyo3(from_py_with = "...")] attribute on an argument of type Option<T>. #2592
    • Fix clippy redundant-closure lint on **kwargs arguments for #[pyfunction] and #[pymethods]. #2595

    [0.17.0] - 2022-08-23

    Packaging

    • Update inventory dependency to 0.3 (the multiple-pymethods feature now requires Rust 1.62 for correctness). #2492

    Added

    • Add timezone_utc. #1588
    • Implement ToPyObject for [T; N]. #2313
    • Add PyDictKeys, PyDictValues and PyDictItems Rust types. #2358
    • Add append_to_inittab. #2377
    • Add FFI definition PyFrame_GetCode. #2406
    • Add PyCode and PyFrame high level objects. #2408
    • Add FFI definitions Py_fstring_input, sendfunc, and _PyErr_StackItem. #2423
    • Add PyDateTime::new_with_fold, PyTime::new_with_fold, PyTime::get_fold, and PyDateTime::get_fold for PyPy. #2428
    • Accept #[pyo3(name)] on enum variants. #2457
    • Add CompareOp::matches to implement __richcmp__ as the result of a Rust std::cmp::Ordering comparison. #2460
    • Add PySuper type. #2486
    • Support PyPy on Windows with the generate-import-lib feature. #2506
    • Add FFI definitions Py_EnterRecursiveCall and Py_LeaveRecursiveCall. #2511
    • Add PyDict::get_item_with_error. #2536
    • Add #[pyclass(sequence)] option. #2567

    Changed

    • Change datetime constructors taking a tzinfo to take Option<&PyTzInfo> instead of Option<&PyObject>: PyDateTime::new, PyDateTime::new_with_fold, PyTime::new, and PyTime::new_with_fold. #1588
    • Move PyTypeObject::type_object method to the PyTypeInfo trait, and deprecate the PyTypeObject trait. #2287
    • Methods of Py and PyAny now accept impl IntoPy<Py<PyString>> rather than just &str to allow use of the intern! macro. #2312
    • Change the deprecated pyproto feature to be opt-in instead of opt-out. #2322
    • Emit better error messages when #[pyfunction] return types do not implement IntoPy. #2326
    • Require T: IntoPy for impl<T, const N: usize> IntoPy<PyObject> for [T; N] instead of T: ToPyObject. #2326
    • Deprecate the ToBorrowedObject trait. #2333
    • Iterators over PySet and PyDict will now panic if the underlying collection is mutated during the iteration. #2380
    • Iterators over PySet and PyDict will now panic if the underlying collection is mutated during the iteration. #2380
    • Allow #[classattr] methods to be fallible. #2385
    • Prevent multiple #[pymethods] with the same name for a single #[pyclass]. #2399
    • Fixup lib_name when using PYO3_CONFIG_FILE. #2404
    • Add a message to the ValueError raised by the #[derive(FromPyObject)] implementation for a tuple struct. #2414
    • Allow #[classattr] methods to take Python argument. #2456
    • Rework PyCapsule type to resolve soundness issues: #2485
      • PyCapsule::new and PyCapsule::new_with_destructor now take name: Option<CString> instead of &CStr.

    ... (truncated)

    Commits
    • caaf7bb release: 0.17.1
    • 511303a Merge pull request #2599 from davidhewitt/no-main-gh-pages
    • 3e15bb9 gh-pages: stop building guide for main
    • 9e9e913 Merge pull request #2595 from davidhewitt/kwargs-clippy
    • 058af11 pyfunction: fix clippy lint on **kwargs argument
    • 73c8532 Merge pull request #2592 from davidhewitt/issue-2280
    • 9d543b3 pyfunction: fix from_py_with on Option<T> argument
    • f927cdb Merge pull request #2558 from mejrs/cargo
    • 611ecc1 fix: export new dict views types (#2590)
    • c28e919 Merge pull request #2589 from davidhewitt/netlify-redirects
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ouroboros requirement from 0.13.0 to 0.14.0 in /python

    Update ouroboros requirement from 0.13.0 to 0.14.0 in /python

    Updates the requirements on ouroboros to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ouroboros requirement from 0.10.0 to 0.13.0 in /python

    Update ouroboros requirement from 0.10.0 to 0.13.0 in /python

    Updates the requirements on ouroboros to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump uraimo/run-on-arch-action from 2.0.5 to 2.3.0

    Bump uraimo/run-on-arch-action from 2.0.5 to 2.3.0

    Bumps uraimo/run-on-arch-action from 2.0.5 to 2.3.0.

    Release notes

    Sourced from uraimo/run-on-arch-action's releases.

    2.3.0

    Updated node to v16.

    2.2.1

    What's Changed

    Full Changelog: https://github.com/uraimo/run-on-arch-action/compare/v2.2.0...v2.2.1

    2.2.0

    Changelog

    New Contributors

    Full Changelog: https://github.com/uraimo/run-on-arch-action/compare/v2.1.2...v2.2.0

    2.1.2

    Fix floating version tags.

    2.1.1

    Support for $GITHUB_ENV.

    2.1.0

    Migration to ghcr.io now that the github docker registry is not available anymore.

    2.0.10

    Added Debian Bullseye to all platforms, thanks @​leoniloris.

    2.0.9

    Added Arch for aarch64 and armv7, thanks to @​benalexau.

    2.0.8

    Added arm32 Fedora.

    2.0.7

    • Include dependabot fixes.

    2.0.6

    • Fixed typo in Alpine dockerfile
    Commits
    • bc503dc Merge pull request #97 from uraimo/update-to-node-16
    • e605299 Update to node v16
    • b818ac0 Merge pull request #87 from uraimo/dependabot/npm_and_yarn/actions/core-1.9.1
    • 1a654d4 Bump @​actions/core from 1.2.6 to 1.9.1
    • d9e985e Merge pull request #74 from pentamassiv/master
    • a1086cf Merge pull request #75 from benalexau/issue-68
    • 81655a3 Run Docker so qemu-aarch64 flags: OCF (fixes uraimo#68)
    • d7221eb Merge pull request #1 from pentamassiv/Added_ubuntu_tags
    • ccab149 Added new ubuntu distros
    • 98a9532 Add Dockerfiles for Ubuntu rolling, devel, latest
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump codecov/codecov-action from 1 to 3

    Bump codecov/codecov-action from 1 to 3

    Bumps codecov/codecov-action from 1 to 3.

    Release notes

    Sourced from codecov/codecov-action's releases.

    v3.0.0

    Breaking Changes

    • #689 Bump to node16 and small fixes

    Features

    • #688 Incorporate gcov arguments for the Codecov uploader

    Dependencies

    • #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
    • #603 [Snyk] Upgrade @​actions/core from 1.5.0 to 1.6.0
    • #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
    • #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
    • #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
    • #652 build(deps-dev): bump @​vercel/ncc from 0.30.0 to 0.33.3
    • #653 build(deps-dev): bump @​types/node from 16.11.21 to 17.0.18
    • #659 build(deps-dev): bump @​types/jest from 27.4.0 to 27.4.1
    • #667 build(deps): bump actions/checkout from 2 to 3
    • #673 build(deps): bump node-fetch from 3.2.0 to 3.2.3
    • #683 build(deps): bump minimist from 1.2.5 to 1.2.6
    • #685 build(deps): bump @​actions/github from 5.0.0 to 5.0.1
    • #681 build(deps-dev): bump @​types/node from 17.0.18 to 17.0.23
    • #682 build(deps-dev): bump typescript from 4.5.5 to 4.6.3
    • #676 build(deps): bump @​actions/exec from 1.1.0 to 1.1.1
    • #675 build(deps): bump openpgp from 5.1.0 to 5.2.1

    v2.1.0

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0

    v2.0.3

    2.0.3

    Fixes

    • #464 Fix wrong link in the readme
    • #485 fix: Add override OS and linux default to platform

    Dependencies

    • #447 build(deps): bump openpgp from 5.0.0-4 to 5.0.0-5
    • #458 build(deps-dev): bump eslint from 7.31.0 to 7.32.0
    • #465 build(deps-dev): bump @​typescript-eslint/eslint-plugin from 4.28.4 to 4.29.1
    • #466 build(deps-dev): bump @​typescript-eslint/parser from 4.28.4 to 4.29.1
    • #468 build(deps-dev): bump @​types/jest from 26.0.24 to 27.0.0
    • #470 build(deps-dev): bump @​types/node from 16.4.0 to 16.6.0
    • #472 build(deps): bump path-parse from 1.0.6 to 1.0.7
    • #473 build(deps-dev): bump @​types/jest from 27.0.0 to 27.0.1

    ... (truncated)

    Changelog

    Sourced from codecov/codecov-action's changelog.

    3.1.1

    Fixes

    • #661 Update deprecation warning
    • #593 Create codeql-analysis.yml
    • #712 README: fix typo
    • #725 fix: Remove a blank row
    • #726 Update README.md with correct badge version
    • #633 Create scorecards-analysis.yml
    • #747 fix: add more verbosity to validation
    • #750 Regenerate scorecards-analysis.yml
    • #774 Switch to v3
    • #783 Fix network entry in table
    • #791 Trim arguments after splitting them
    • #769 Plumb failCi into verification function.

    Dependencies

    • #713 build(deps-dev): bump typescript from 4.6.3 to 4.6.4
    • #714 build(deps): bump node-fetch from 3.2.3 to 3.2.4
    • #724 build(deps): bump github/codeql-action from 1 to 2
    • #717 build(deps-dev): bump @​types/jest from 27.4.1 to 27.5.0
    • #729 build(deps-dev): bump @​types/node from 17.0.25 to 17.0.33
    • #734 build(deps-dev): downgrade @​types/node to 16.11.35
    • #723 build(deps): bump actions/checkout from 2 to 3
    • #733 build(deps): bump @​actions/github from 5.0.1 to 5.0.3
    • #732 build(deps): bump @​actions/core from 1.6.0 to 1.8.2
    • #737 build(deps-dev): bump @​types/node from 16.11.35 to 16.11.36
    • #749 build(deps): bump ossf/scorecard-action from 1.0.1 to 1.1.0
    • #755 build(deps-dev): bump typescript from 4.6.4 to 4.7.3
    • #759 build(deps-dev): bump @​types/node from 16.11.36 to 16.11.39
    • #762 build(deps-dev): bump @​types/node from 16.11.39 to 16.11.40
    • #746 build(deps-dev): bump @​vercel/ncc from 0.33.4 to 0.34.0
    • #757 build(deps): bump ossf/scorecard-action from 1.1.0 to 1.1.1
    • #760 build(deps): bump openpgp from 5.2.1 to 5.3.0
    • #748 build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.0
    • #766 build(deps-dev): bump typescript from 4.7.3 to 4.7.4
    • #799 build(deps): bump openpgp from 5.3.0 to 5.4.0
    • #798 build(deps): bump @​actions/core from 1.8.2 to 1.9.1

    3.1.0

    Features

    • #699 Incorporate xcode arguments for the Codecov uploader

    Dependencies

    • #694 build(deps-dev): bump @​vercel/ncc from 0.33.3 to 0.33.4
    • #696 build(deps-dev): bump @​types/node from 17.0.23 to 17.0.25
    • #698 build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0

    3.0.0

    Breaking Changes

    • #689 Bump to node16 and small fixes

    ... (truncated)

    Commits
    • d9f34f8 release: update changelog and version to 3.1.1 (#828)
    • 0e9e7b4 Plumb failCi into verification function. (#769)
    • 7f20bd4 build(deps): bump @​actions/core from 1.8.2 to 1.9.1 (#798)
    • 13bc253 build(deps): bump openpgp from 5.3.0 to 5.4.0 (#799)
    • 5c0da1b Trim arguments after splitting them (#791)
    • 68d5f6d Fix network entry in table (#783)
    • 2a829b9 Switch to v3 (#774)
    • 8e09eaf build(deps-dev): bump typescript from 4.7.3 to 4.7.4 (#766)
    • 39e2229 build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.0 (#748)
    • b2b7703 build(deps): bump openpgp from 5.2.1 to 5.3.0 (#760)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Wildly differing results compared to crfsuite-rs

    Wildly differing results compared to crfsuite-rs

    I'm using crfs for part-of-speech tagging and I noticed the output is very different compared to crfsuite-rs.

    With the input The quick brown fox jumped over the lazy dog:

    crfsuite-rs: DT JJ NN RB VBN IN DT JJ NN
    crfs: DT JJ NN JJ NN IN DT JJ NN
    

    Tagging code using crfs Model: pos.crf Test script:

    use std::fs;
    
    use crfs::Model;
    use pos_test::PartOfSpeechTagger;
    
    fn main() {
    	let model = fs::read("./pos.crf").unwrap();
    	let model = Model::new(&model).unwrap();
    	let mut tagger = PartOfSpeechTagger::new(&model, Default::default()).unwrap();
    	let sentence = "The quick brown fox jumped over the lazy dog.";
    	let results = tagger.tag(&sentence.split_ascii_whitespace().collect::<Vec<_>>()).unwrap();
    	for part in results {
    		print!("{part} ");
    	}
    	println!();
    }
    
    opened by sudo-carson 0
  • Decouple inference state from model

    Decouple inference state from model

    When looking at the code I saw the viterbi state is held inside the context and mutated. This prevents the tagger from running multiple calls to tag concurrently and limits performance for users where they want to do tags concurrently over multiple elements. Instead they'll need to wrap the tagger in a mutex or clone it and all the data (including the mutable state).

    An alternative design which would be more multi-threading friendly would be to split the fields that mutate into a new struct something like ViterbiState and change viterbi implementation into fn viterbi(&self, state: &mut ViterbiState) and then make the tag function in the tagger fn tag(&self, xseq: &[T]) where it creates a ViterbiState and passes it into the call to viterbi. This would also remove/simpliy a bunch of the reset code

    opened by xd009642 1
  • Model training

    Model training

    Hello @messense , You doing a Hero work. CRFsuite is legendary for its performance in multiple scenarios. It still knock up Deep learning for many tasks in our pipeline.

    I´m just curious, do you plan to implement model training?

    Thanks!

    enhancement help wanted 
    opened by bratao 2
Owner
messense
Python Backend Developer at day, Rustacean at night.
messense
Fast and compact sets of bytes or ASCII characters

bset Fast and compact sets of bytes and ASCII characters, useful for searching, parsing and determining membership of a given byte in the given set. T

null 26 Jul 19, 2022
A series of compact encoding schemes for building small and fast parsers and serializers

A series of compact encoding schemes for building small and fast parsers and serializers

Manfred Kröhnert 2 Feb 5, 2022
MessagePack implementation for Rust / msgpack.org[Rust]

RMP - Rust MessagePack RMP is a pure Rust MessagePack implementation. This repository consists of three separate crates: the RMP core and two implemen

Evgeny Safronov 840 Dec 30, 2022
Implementation of Bencode encoding written in rust

Rust Bencode Implementation of Bencode encoding written in rust. Project Status Not in active developement due to lack of time and other priorities. I

Arjan Topolovec 32 Aug 6, 2022
A Gecko-oriented implementation of the Encoding Standard in Rust

encoding_rs encoding_rs an implementation of the (non-JavaScript parts of) the Encoding Standard written in Rust and used in Gecko (starting with Fire

Henri Sivonen 284 Dec 13, 2022
Rust implementation of CRC(16, 32, 64) with support of various standards

crc Rust implementation of CRC(16, 32, 64). MSRV is 1.46. Usage Add crc to Cargo.toml [dependencies] crc = "2.0" Compute CRC use crc::{Crc, Algorithm,

Rui Hu 120 Dec 23, 2022
PROST! a Protocol Buffers implementation for the Rust Language

PROST! prost is a Protocol Buffers implementation for the Rust Language. prost generates simple, idiomatic Rust code from proto2 and proto3 files. Com

Dan Burkert 17 Jan 8, 2023
Rust implementation of Google protocol buffers

rust-protobuf Protobuf implementation in Rust. Written in pure rust Generate rust code Has runtime library for generated code (Coded{Input|Output}Stre

Stepan Koltsov 2.3k Dec 31, 2022
A binary encoder / decoder implementation in Rust.

Bincode A compact encoder / decoder pair that uses a binary zero-fluff encoding scheme. The size of the encoded object will be the same or smaller tha

Bincode 1.9k Dec 29, 2022
rust-jsonnet - The Google Jsonnet( operation data template language) for rust

rust-jsonnet ==== Crate rust-jsonnet - The Google Jsonnet( operation data template language) for rust Google jsonnet documet: (http://google.github.io

Qihoo 360 24 Dec 1, 2022
A Rust ASN.1 (DER) serializer.

rust-asn1 This is a Rust library for parsing and generating ASN.1 data (DER only). Installation Add asn1 to the [dependencies] section of your Cargo.t

Alex Gaynor 85 Dec 16, 2022
Encoding and decoding support for BSON in Rust

bson-rs Encoding and decoding support for BSON in Rust Index Overview of BSON Format Usage BSON Values BSON Documents Modeling BSON with strongly type

mongodb 304 Dec 30, 2022
Rust library for reading/writing numbers in big-endian and little-endian.

byteorder This crate provides convenience methods for encoding and decoding numbers in either big-endian or little-endian order. Dual-licensed under M

Andrew Gallant 811 Jan 1, 2023
Cap'n Proto for Rust

Cap'n Proto for Rust documentation blog Introduction Cap'n Proto is a type system for distributed systems. With Cap'n Proto, you describe your data an

Cap'n Proto 1.5k Dec 26, 2022
Character encoding support for Rust

Encoding 0.3.0-dev Character encoding support for Rust. (also known as rust-encoding) It is based on WHATWG Encoding Standard, and also provides an ad

Kang Seonghoon 264 Dec 14, 2022
A CSV parser for Rust, with Serde support.

csv A fast and flexible CSV reader and writer for Rust, with support for Serde. Dual-licensed under MIT or the UNLICENSE. Documentation https://docs.r

Andrew Gallant 1.3k Jan 5, 2023
A HTTP Archive format (HAR) serialization & deserialization library, written in Rust.

har-rs HTTP Archive format (HAR) serialization & deserialization library, written in Rust. Install Add the following to your Cargo.toml file: [depende

Sebastian Mandrean 25 Dec 24, 2022
A HTML entity encoding library for Rust

A HTML entity encoding library for Rust Example usage All example assume a extern crate htmlescape; and use htmlescape::{relevant functions here}; is

Viktor Dahl 41 Nov 1, 2022
pem-rs pem PEM jcreekmore/pem-rs [pem] — A Rust based way to parse and encode PEM-encoded data

pem A Rust library for parsing and encoding PEM-encoded data. Documentation Module documentation with examples Usage Add this to your Cargo.toml: [dep

Jonathan Creekmore 30 Dec 27, 2022