Coder Social home page Coder Social logo

Comments (2)

llccd avatar llccd commented on July 19, 2024 1

Same issue on Debian with GCC 12. I changed code as following and it works.

diff --git a/src/NiuTrans.Decoder/DataCheck.cpp b/src/NiuTrans.Decoder/DataCheck.cpp
index 94b888f..5c39329 100644
--- a/src/NiuTrans.Decoder/DataCheck.cpp
+++ b/src/NiuTrans.Decoder/DataCheck.cpp
@@ -34,7 +34,7 @@

 namespace smt{

-bool DataChecker::CheckInputSentences(const char * fn, bool forTuning, int nref)
+void DataChecker::CheckInputSentences(const char * fn, bool forTuning, int nref)
 {
        char * line = new char[MAX_LINE_LENGTH];
        char * msg = new char[1024];
diff --git a/src/NiuTrans.Decoder/DataCheck.h b/src/NiuTrans.Decoder/DataCheck.h
index afed948..fe0bafe 100644
--- a/src/NiuTrans.Decoder/DataCheck.h
+++ b/src/NiuTrans.Decoder/DataCheck.h
@@ -50,7 +50,7 @@ public:
        ~DataChecker(){};

 public:
-       static bool CheckInputSentences(const char * fn, bool forTuning, int nref);
+       static void CheckInputSentences(const char * fn, bool forTuning, int nref);
        static bool CheckSentence(const char * sent, char * msg);
        static bool CheckModelFiles(Configer * configer);

diff --git a/src/NiuTrans.Decoder/TrainingAndDecoding.cpp b/src/NiuTrans.Decoder/TrainingAndDecoding.cpp
index b8a8ec1..eabcabc 100644
--- a/src/NiuTrans.Decoder/TrainingAndDecoding.cpp
+++ b/src/NiuTrans.Decoder/TrainingAndDecoding.cpp
@@ -388,7 +388,7 @@ void OurSystem::InitForDecodingForServicecMode(int threadNum)

 void OurSystem::ReadTestSentences(const char * testfn)
 {
-   char line[MAX_LINE_LENGTH/4] = "";
+   char line[MAX_LINE_LENGTH] = "";

    /* load test sentences */
     FILE * file = fopen(testfn, "rb");

from niutrans.smt.

liyinqiao2012 avatar liyinqiao2012 commented on July 19, 2024

Hi, I am using the latest version of NiuTrans.SMT, and while following the Quick Walkthrough of the user manual, I encountered the following issue: image I am running this on Centos Stream 8. Please do advise. Thank you!

We have fixed this bug in the latest version. Please check it out. Many thanks to @llccd .

from niutrans.smt.

Related Issues (9)

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.