Skip to content

Commit

Permalink
Merge pull request #37 from stephantul/36-bump-version
Browse files Browse the repository at this point in the history
Bump version, add examples to README
  • Loading branch information
stephantul committed May 3, 2023
2 parents c3dbd05 + d884386 commit d8453dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ vectorized = r.vectorize(sentence)
# can remove OOV words automatically.
vectorized = r.vectorize(sentence, remove_oov=True)

# Can mean pool out of the box.
mean = r.mean_pool(sentence)
# Automatically take care of incorrect sentences
# these are set to the vector of the UNK word, or a vector of zeros.
corpus_mean = r.mean_pool_corpus([sentence, sentence, ["not_a_word"]], remove_oov=True, safeguard=False)

# vectorize corpus.
transformed = r.transform(corpus)

Expand All @@ -83,7 +89,7 @@ thresholded = r.threshold("cat", threshold=.0)

## Loading and saving

`reach` has many options for saving and loading files, including custom separators, custom number of dimensions, loading a custom wordlist, custom number of words, and error recovery. One difference between `gensim` and `reach` is that `reach` loads both GloVe-style .vec files and regular word2vec files. Unlike `gensim`, `reach` does not support loading binary files.
`reach` has many options for saving and loading files, including custom separators, custom number of dimensions, loading a custom wordlist, custom number of words, and error recovery. One difference between `gensim` and `reach` is that `reach` loads both GloVe-style .vec files and regular word2vec files. Unlike `gensim`, `reach` does not support loading binary files.

### benchmark

Expand Down Expand Up @@ -160,4 +166,4 @@ MIT

# Author

Stéphan Tulkens
Stéphan Tulkens
2 changes: 1 addition & 1 deletion reach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
except ImportError:
__all__ = ["Reach", "normalize"]

__version__ = "4.0.2"
__version__ = "4.1.0"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
"""Setup file."""
from pathlib import Path
from setuptools import setup, find_packages

from setuptools import find_packages, setup

setup(
name="reach",
version="4.0.2", # noqa
version="4.1.0",
description="A light-weight package for working with pre-trained word embeddings",
author="Stéphan Tulkens",
author_email="stephantul@gmail.com",
Expand Down

0 comments on commit d8453dd

Please sign in to comment.