Created
December 12, 2018 09:08
-
-
Save mahimrocky/ec115e7a0a6c1af85d1bb9213ad22808 to your computer and use it in GitHub Desktop.
Reading or detecting name from string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String readName(String cnt[]) { | |
String sd = ""; | |
Span sp[] = nameFinderME.find(cnt); | |
String a[] = Span.spansToStrings(sp, cnt); | |
StringBuilder fd = new StringBuilder(); | |
int l = a.length; | |
for (int j = 0; j < l; j++) { | |
fd = fd.append(a[j] + "\n"); | |
} | |
sd = fd.toString(); | |
return sd; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment