do searching in a very big ARPA file in a very short time in java

前端 未结 1 1537
故里飘歌
故里飘歌 2021-01-22 23:45

I have an ARPA file which is almost 1 GB. I have to do searching in it in less than 1 minute. I have searched a lot, but I have not found the suitable answer yet. I think I do n

1条回答
  •  再見小時候
    2021-01-22 23:55

    I don't know what an ARPA file is. I'm assuming it's some sort of file containing text.

    What you want to do is first index the file so you can associate line numbers in the file to Strings.

    That's a big file so you'd probably store your index in a separate file.

    First, prior to the user searching, you'd run your index. Then you'd search your index for the line numbers where the String the user is looking for is found.

    0 讨论(0)
提交回复
热议问题