Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 66 lines (49 sloc) 2.529 kB
2e9bd7b @lok Initial Commit
authored
1 //
5291e63 @lok Added license stuff
authored
2 // BKTokenizer.h
3 // Licensed under the terms of the BSD License, as specified below.
2e9bd7b @lok Initial Commit
authored
4 //
5
5291e63 @lok Added license stuff
authored
6 /*
7 Copyright (c) 2010, Samuel Mendes
8
9 All rights reserved.
10
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13
14 * Redistributions of source code must retain the above copyright
15 notice, this list of conditions and the following disclaimer.
16
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20
21 * Neither the name of ᐱ nor the names of its
22 contributors may be used to endorse or promote products derived
23 from this software without specific prior written permission.
24
25 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
31 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
2e9bd7b @lok Initial Commit
authored
38 #import <Foundation/Foundation.h>
39 #import <BayesianKit/BKTokenizing.h>
40
9970412 @lok API Documentation
authored
41 /** Simple tokenizer based on ParseKit aimed to tokenize source code. */
2e9bd7b @lok Initial Commit
authored
42 @interface BKTokenizer : NSObject <BKTokenizing> {
b6ea405 @lok Tokenizer gets a lowercase option
authored
43 BOOL lowerCaseTokens;
2e9bd7b @lok Initial Commit
authored
44 }
9970412 @lok API Documentation
authored
45
46 //////////////////////////////////////////////////////////////////////////////////////////
47 /// @name Properties
48 //////////////////////////////////////////////////////////////////////////////////////////
49
50 /** If set to YES the tokenizer will return only lowercase tokens. */
b6ea405 @lok Tokenizer gets a lowercase option
authored
51 @property (readwrite) BOOL lowerCaseTokens;
2e9bd7b @lok Initial Commit
authored
52
9970412 @lok API Documentation
authored
53
54 //////////////////////////////////////////////////////////////////////////////////////////
55 /// @name Tokenizing
56 //////////////////////////////////////////////////////////////////////////////////////////
57
58 /** Returns every tokens found in a string.
59
60 @param string The string to tokenize.
61 @return An array filled with every tokens.
62 */
2e9bd7b @lok Initial Commit
authored
63 - (NSArray*)tokenizeString:(NSString *)string;
64
65 @end
Something went wrong with that request. Please try again.