Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:cloudera/RecordBreaker

  • Loading branch information...
commit 98281619c8780b713c1cce98bc91bafa1812bb9a 2 parents 124df2f + e3f4a43
@mikecafarella mikecafarella authored
View
2  src/java/com/cloudera/recordbreaker/learnstructure/InferredType.java
@@ -499,7 +499,7 @@ ParseResult internalParse(String s, Map<String, Integer> targetUnionDecisions, b
String currentStr = s;
while (true) {
- ParseResult pr = bodyType.internalParse(s, targetUnionDecisions, false);
+ ParseResult pr = bodyType.internalParse(currentStr, targetUnionDecisions, false);
if (pr == null) {
break;
}
View
8 src/java/com/cloudera/recordbreaker/learnstructure/Tokenizer.java
@@ -183,8 +183,12 @@ public static String attemptParse(int tokenClassId, String tokenParameter, Strin
case Token.STRING_TOKENCLASSID: {
Matcher m = stringPattern.matcher(inputStr);
if (m.lookingAt()) {
- outputToks.add(new Token.StringToken(m.group(1)));
- return cutChunk(m, inputStr);
+ Matcher m2 = intPattern.matcher(inputStr);
+ Matcher m3 = floatPattern.matcher(inputStr);
+ if (! (m2.lookingAt() || m3.lookingAt())) {
+ outputToks.add(new Token.StringToken(m.group(1)));
+ return cutChunk(m, inputStr);
+ }
}
return null;
}
View
2  src/java/com/cloudera/recordbreaker/learnstructure/TypeInference.java
@@ -23,7 +23,7 @@
*
**********************************************************/
public class TypeInference {
- static int MAX_SAMPLES = 3;
+ static int MAX_SAMPLES = 5;
/////////////////////////////////////
// Inner Classes
Please sign in to comment.
Something went wrong with that request. Please try again.