diff --git a/mozolm/models/language_model.cc b/mozolm/models/language_model.cc index 738f8d4..3fd93ef 100644 --- a/mozolm/models/language_model.cc +++ b/mozolm/models/language_model.cc @@ -16,9 +16,9 @@ #include -#include "ngram/ngram-model.h" #include "absl/strings/str_cat.h" #include "nisaba/port/utf8_util.h" +#include "ngram/ngram-model.h" namespace mozolm { namespace models { diff --git a/mozolm/models/language_model_hub.cc b/mozolm/models/language_model_hub.cc index cb900b8..0e3fdcc 100644 --- a/mozolm/models/language_model_hub.cc +++ b/mozolm/models/language_model_hub.cc @@ -18,8 +18,8 @@ #include #include "google/protobuf/stubs/logging.h" -#include "ngram/ngram-model.h" #include "nisaba/port/utf8_util.h" +#include "ngram/ngram-model.h" #include "nisaba/port/status_macros.h" namespace mozolm { diff --git a/mozolm/models/ngram_fst_model.h b/mozolm/models/ngram_fst_model.h index 9a71107..2c705ae 100644 --- a/mozolm/models/ngram_fst_model.h +++ b/mozolm/models/ngram_fst_model.h @@ -20,11 +20,11 @@ #include #include -#include "ngram/ngram-model.h" #include "absl/status/status.h" #include "mozolm/models/language_model.h" #include "mozolm/models/model_storage.pb.h" #include "fst/vector-fst.h" +#include "ngram/ngram-model.h" namespace mozolm { namespace models { diff --git a/mozolm/models/ngram_word_fst_model.cc b/mozolm/models/ngram_word_fst_model.cc index 72b977a..20db099 100644 --- a/mozolm/models/ngram_word_fst_model.cc +++ b/mozolm/models/ngram_word_fst_model.cc @@ -19,7 +19,6 @@ #include #include "google/protobuf/stubs/logging.h" -#include "ngram/ngram-model.h" #include "absl/memory/memory.h" #include "mozolm/models/model_storage.pb.h" #include "mozolm/models/ngram_word_fst_options.pb.h" @@ -27,6 +26,7 @@ #include "fst/fst.h" #include "fst/matcher.h" #include "fst/symbol-table.h" +#include "ngram/ngram-model.h" #include "nisaba/port/status_macros.h" using nisaba::utf8::DecodeSingleUnicodeChar; diff --git a/mozolm/models/ppm_as_fst_model.cc b/mozolm/models/ppm_as_fst_model.cc index 2b73a06..ebe7b7c 100644 --- a/mozolm/models/ppm_as_fst_model.cc +++ b/mozolm/models/ppm_as_fst_model.cc @@ -18,8 +18,6 @@ #include #include "google/protobuf/stubs/logging.h" -#include "ngram/ngram-count.h" -#include "ngram/ngram-model.h" #include "absl/container/flat_hash_set.h" #include "absl/memory/memory.h" #include "absl/status/statusor.h" @@ -30,6 +28,8 @@ #include "fst/arcsort.h" #include "fst/symbol-table.h" #include "fst/vector-fst.h" +#include "ngram/ngram-count.h" +#include "ngram/ngram-model.h" #include "nisaba/port/status_macros.h" namespace mozolm { diff --git a/mozolm/models/ppm_as_fst_model.h b/mozolm/models/ppm_as_fst_model.h index 248dfb5..aca1fb7 100644 --- a/mozolm/models/ppm_as_fst_model.h +++ b/mozolm/models/ppm_as_fst_model.h @@ -66,13 +66,13 @@ #include #include -#include "ngram/ngram-count.h" #include "absl/status/statusor.h" #include "mozolm/models/language_model.h" #include "mozolm/models/model_storage.pb.h" #include "mozolm/models/ppm_as_fst_options.pb.h" #include "fst/symbol-table.h" #include "fst/vector-fst.h" +#include "ngram/ngram-count.h" namespace mozolm { namespace models { diff --git a/mozolm/utils/ngram_utils.bzl b/mozolm/utils/ngram_utils.bzl index e6e53ac..3da4df3 100644 --- a/mozolm/utils/ngram_utils.bzl +++ b/mozolm/utils/ngram_utils.bzl @@ -48,7 +48,7 @@ def ngram_convert_arpa_to_fst( ) # Convert from ARPA to FST format. - converter_rule = "//third_party/opengrm/ngram:ngramread" + converter_rule = "@org_opengrm_ngram//:ngramread" original_output_name = output_name if relabel_to_codepoints: # This is going to be an intermediate target. @@ -57,7 +57,7 @@ def ngram_convert_arpa_to_fst( name = output_name + "_fst", srcs = [":%s_uncompress" % name], outs = [output_name + ".fst"], - cmd = "$(location //third_party/opengrm/ngram:ngramread) --ARPA $< $@", + cmd = "$(location @org_opengrm_ngram//:ngramread) --ARPA $< $@", tools = [ converter_rule, ],