Git Product home page Git Product logo

Comments (4)

jermp avatar jermp commented on August 23, 2024 1

Hi,
for example, with the command
./sort_arpa 2 ../test_data/arpa ../test_data/1-grams.sorted.gz arpa_sorted_2grams
you sort in suffix order the 2-grams of the test ARPA file test_data/arpa.
The output is a file (called arpa_sorted_2grams in the example above) with all the sorted 2-grams.
You must supply the vocabulary as a list of uni-grams (test_data/1-grams.sorted.gz) in the example.

So you sort all orders and you concatenate them together (plus the ARPA header too).

Let me know is everything is clear now.

PS. There was a minor bug that I fixed now. So pull the new version of the code before trying again.

from tongrams.

jermp avatar jermp commented on August 23, 2024

Hi,
are you sure your arpa file is sorted correctly?
It should be sorted in suffix order.
If it is not sorted, you can use the sorting utility src/sort_arpa.cpp, here https://github.com/jermp/tongrams/blob/master/src/sort_arpa.cpp

Let me know.

from tongrams.

abdullah-saal avatar abdullah-saal commented on August 23, 2024

Hi, thanks for the quick response,
I have tried "sort_arpa", the thing is the output of that command isn't ARPA format, so I couldn't use it with build_trie, not sure if I am misunderstanding something.

from tongrams.

abdullah-saal avatar abdullah-saal commented on August 23, 2024

Thanks. working now.

from tongrams.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.