Skip to content

Commit a7ecec0

Browse files
committed
Initial commit with empty library
This is the beginning of us open sourcing our fast Aho-Corasick implementation. Credit to Tijmen for suggesting the name "Alfred-Margaret".
0 parents  commit a7ecec0

File tree

6 files changed

+94
-0
lines changed

6 files changed

+94
-0
lines changed

LICENSE

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright 2019 Channable
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
* Neither the name of Author name here nor the names of other
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Alfred-Margaret
2+
3+
Alfred-Margaret is a fast implementation of the Aho-Corasick string
4+
searching algorithm in Haskell. It powers many string-related operations
5+
in [Channable][channable].
6+
7+
The library is designed to work with the [`text`][text] package. It matches
8+
directly on the internal UTF-16 representation of `Text` for efficiency. See the
9+
[announcement blog post][blog-post] for a deeper dive into Aho-Corasick, and the
10+
optimizations that make this library fast.
11+
12+
Alfred-Margaret is named after Alfred Aho and Margaret Corasick.
13+
14+
## Example
15+
16+
TODO: Add example.
17+
18+
## License
19+
20+
Alfred-Margaret is licensed under the 3-clause BSD license.
21+
22+
[channable]: https://www.channable.com/
23+
[blog-post]: https://tech.channable.com/TODO
24+
[text]: https://github.com/haskell/text

Setup.hs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

alfred-margaret.cabal

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: alfred-margaret
2+
version: 1.0.0.0
3+
synopsis: Fast Aho-Corasick string searching
4+
description: An efficient implementation of the Aho-Corasick
5+
string searching algorithm.
6+
homepage: https://github.com/channable/alfred-margaret
7+
license: BSD3
8+
license-file: LICENSE
9+
author: The Alfred-Margaret authors
10+
maintainer: Ruud van Asseldonk <[email protected]>
11+
copyright: 2019 Channable
12+
category: Data, Text
13+
build-type: Simple
14+
extra-source-files: README.md
15+
cabal-version: >=1.10
16+
17+
library
18+
hs-source-dirs: src
19+
exposed-modules: Data.Text.AhoCorasick
20+
build-depends: base >= 4.7 && < 5
21+
default-language: Haskell2010
22+
23+
source-repository head
24+
type: git
25+
location: https://github.com/channable/alfred-margaret

src/Data/Text/AhoCorasick.hs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- Alfred-Margaret: Fast Aho-Corasick string searching
2+
-- Copyright 2019 Channable
3+
--
4+
-- Licensed under the 3-clause BSD license, see the LICENSE file in the
5+
-- repository root.
6+
7+
module Data.Text.AhoCorasick
8+
(
9+
)
10+
where

stack.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
resolver: lts-13.10
2+
packages:
3+
- .

0 commit comments

Comments
 (0)