Skip to content

Is there any implemention of language model? #1

Description

@rubbishgod

Hi, As shown in Scorer.h and Scorer.cpp, this project works when language model is provided. Thus, will you provide the implementation of the language model?

Scorer.cpp:
`#include

#include "scorer.h"
#include "lm/model.hh"
#include "util/tokenize_piece.hh"
#include "util/string_piece.hh"

using namespace lm::ngram;`

Scorer.h:
`#ifndef SCORER_H_
#define SCORER_H_

#include

class Scorer{
private:
float _alpha;
float _beta;
void *_language_model;

public:
Scorer(){}
Scorer(float alpha, float beta, std::string lm_model_path);
~Scorer();
int word_count(std::string);
double language_model_score(std::string);
double get_score(std::string);
};

#endif
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions