Kal
Kal

Reputation: 161

Best pattern Matching algorithm implemented in Java

I am new to Java . My problem is I have to select the rows of an entire file (Size less than 70MB) to match my pattern (e.g.<subject> <Predicate> <Object>). Currently I am using basic string matching algorithm bit it takes time so I want to use "Boyer-Moore algorithm". Is it good to use? Do we have some other better solution? If yes Please let me know and the code also in Java.

Upvotes: 0

Views: 3979

Answers (3)

Umesh Kacha
Umesh Kacha

Reputation: 13686

JEval is an advanced library for adding high-performance, mathematical, Boolean and functional expression parsing and evaluation to your Java applications

Upvotes: 0

user207421
user207421

Reputation: 310980

I did some work on this a long time ago.I found the Knuth-Morris-Pratt algorithm faster than Boyer-Moore.

Upvotes: 2

Vincent Mimoun-Prat
Vincent Mimoun-Prat

Reputation: 28551

A quick Google returned:

Maybe you simply give it a try and see the results.

Upvotes: 2

Related Questions