Skip to content

Commit bd7befa

Browse files
committed
Prepare release v0.1
1 parent db7aa73 commit bd7befa

File tree

7 files changed

+79
-6
lines changed

7 files changed

+79
-6
lines changed

AUTHORS

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This is the official list of the AUTHORS of "distance"
2+
# for copyright purposes.
3+
# This file is distinct from the CONTRIBUTORS files.
4+
# See the latter for an explanation.
5+
6+
# Names should be added to this file as
7+
# Name or Organization <email address>
8+
# The email address is not required for organizations.
9+
10+
Marcus Brummer <mbrlabs7@gmail.com>

CHANGES

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[0.1.0] ~ 28/06/2016
2+
- Initial release
3+
- Added the Levenshtein distance algorithm
4+
- Added tests for the Levenshtein distance algorithm

CONTRIBUTORS

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This is the official list of people who can contribute
2+
# (and who have contributed) code to the "distance" project
3+
# repository.
4+
# The AUTHORS file lists the copyright holders; this file
5+
# lists people. Contributors must sign the CLA to grant
6+
# the AUTHORS copyright within the terms of the Apache 2 license.
7+
#
8+
9+
mbrlabs https://github.com/mbrlabs

Cargo.toml

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ name = "distance"
33
version = "0.1.0"
44
authors = ["Marcus Brummer <mbrlabs7@gmail.com>"]
55

6-
keywords = ["string matching", "string", "matching", "levenshtein"]
6+
description = "A collection of approximate string matching algorithms"
7+
keywords = ["search", "text", "string", "matching", "levenshtein"]
78
repository = "https://github.com/mbrlabs/distance"
9+
homepage = "https://github.com/mbrlabs/distance"
810
readme = "README.md"
911
license = "Apache-2.0"
12+
publish = false
1013

11-
[dependencies]
14+
include = [
15+
"**/*.rs",
16+
"Cargo.toml",
17+
"LICENCE",
18+
"AUTHORS",
19+
"CONTRIBUTORS",
20+
"CHANGES",
21+
]

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
# distance [![](https://travis-ci.org/mbrlabs/distance.svg?branch=master)](https://travis-ci.org/mbrlabs/distance)
1+
# distance
2+
[![](https://travis-ci.org/mbrlabs/distance.svg?branch=master)](https://travis-ci.org/mbrlabs/distance)
3+
[![](https://img.shields.io/crates/v/distance.svg)](https://crates.io/crates/distance)
4+
25
This is a rust library for approximate string matching algorithms.
6+
Possible applications for this are fuzzy string searching, spell checkers, spam filters, etc.
37

48
## Algorithms
59
- [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance)
610

11+
## Add as dependency
12+
distance is available on [crates.io](https://crates.io/crates/distance).
13+
14+
```toml
15+
[dependencies]
16+
distance = "0.1"
17+
```
18+
719
## Usage
20+
821
```rust
922
use distance::*;
1023

src/levenshtein.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
// Copyright (c) 2016. See AUTHORS file.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
use std::cmp;
216

317
/// # Levenshtein distance
418
///
519
/// The [Levenshtein distance]((https://en.wikipedia.org/wiki/Levenshtein_distance)) is the number of per-character changes (insertion, deletion & substitution)
6-
/// one string differs from annother.
20+
/// that are neccessary to convert one string into annother.
721
///
822
/// ## Examples
923
/// ```

src/lib.rs

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1+
// Copyright (c) 2016. See AUTHORS file.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
//! # A collection of approximate string matching algorithms
216
//!
3-
//! This library contains algorithms for approximate string matching.
17+
//! This library contains algorithms dealing with approximate string matching.
418
//! These algorithms can be used to tell the approximate difference between two
519
//! strings. This is usful for a varity of things like spell checking, fuzzy search, etc.
620
//!
@@ -13,5 +27,4 @@
1327
//!
1428
1529
pub use self::levenshtein::*;
16-
1730
mod levenshtein;

0 commit comments

Comments
 (0)