Skip to content

Commit

Permalink
Merge pull request #20 from minibikini/release-0.5.0
Browse files Browse the repository at this point in the history
Release 0.5.0
  • Loading branch information
minibikini authored Oct 31, 2019
2 parents 430c338 + 200ccd4 commit 5c48dc5
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

## [Unreleased]

## 0.5.0 - 2019-10-31

### Added

- A script to update language data

### Changed

- Update language data
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

Natural language detection for Elixir

[Api Documentation] | [Hex Package]
[API Documentation] | [Hex Package]

## Installation

Add `paasaa` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:paasaa, "~> 0.4.0"}]
[{:paasaa, "~> 0.5.0"}]
end
```

Expand Down Expand Up @@ -43,6 +43,12 @@ iex> Paasaa.all("Detect this!")
]
```

## Benchmark

```shell
mix bench
```

## Update Language Data

```shell
Expand Down
13 changes: 13 additions & 0 deletions lib/paasaa.ex
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ defmodule Paasaa do
end
end

@doc """
Detects a script.
## Parameters
- `str` - a text string
## Examples
iex> Paasaa.detect_script("Detect this!")
{"Latin", 0.8333333333333334}
"""

@spec detect_script(str :: String.t()) :: {String.t(), number}
def detect_script(str) do
len = String.length(str)
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule Paasaa.Mixfile do
def project do
[
app: :paasaa,
version: "0.4.0",
elixir: "~> 1.7",
version: "0.5.0",
elixir: "~> 1.8",
description: description(),
package: package(),
deps: deps(),
Expand Down

0 comments on commit 5c48dc5

Please sign in to comment.