]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
extra : sync grammar-parser
authorGeorgi Gerganov <redacted>
Sun, 7 Apr 2024 14:04:22 +0000 (17:04 +0300)
committerGeorgi Gerganov <redacted>
Sun, 7 Apr 2024 14:04:22 +0000 (17:04 +0300)
extra/sync-ggml-am.sh
extra/sync-ggml.sh

index 61191be7b9356ef9f1707e98541d3e917ccc4816..dc4be9bddd6690212165f4bf1d5a729372cbb44e 100755 (executable)
@@ -65,6 +65,8 @@ while read c; do
         examples/common.cpp \
         examples/common-ggml.h \
         examples/common-ggml.cpp \
+        examples/whisper/grammar-parser.h \
+        examples/whisper/grammar-parser.cpp \
         examples/whisper/whisper.h \
         examples/whisper/whisper.cpp \
         examples/whisper/main.cpp \
@@ -121,10 +123,12 @@ if [ -f $SRC_WHISPER/ggml-src.patch ]; then
     # include/ggml/ggml-alloc.h   -> ggml-alloc.h
     # include/ggml/ggml-backend.h -> ggml-backend.h
     #
-    # examples/common.h           -> examples/common.h
-    # examples/common.cpp         -> examples/common.cpp
-    # examples/common-ggml.h      -> examples/common-ggml.h
-    # examples/common-ggml.cpp    -> examples/common-ggml.cpp
+    # examples/common.h                   -> examples/common.h
+    # examples/common.cpp                 -> examples/common.cpp
+    # examples/common-ggml.h              -> examples/common-ggml.h
+    # examples/common-ggml.cpp            -> examples/common-ggml.cpp
+    # examples/whisper/grammar-parser.h   -> examples/grammar-parser.h
+    # examples/whisper/grammar-parser.cpp -> examples/grammar-parser.cpp
     #
     # examples/whisper/whisper.h    -> whisper.h
     # examples/whisper/whisper.cpp  -> whisper.cpp
@@ -162,6 +166,8 @@ if [ -f $SRC_WHISPER/ggml-src.patch ]; then
         -e 's/examples\/common\.cpp/examples\/common.cpp/g' \
         -e 's/examples\/common-ggml\.h/examples\/common-ggml.h/g' \
         -e 's/examples\/common-ggml\.cpp/examples\/common-ggml.cpp/g' \
+        -e 's/examples\/whisper\/grammar-parser\.h/examples\/grammar-parser.h/g' \
+        -e 's/examples\/whisper\/grammar-parser\.cpp/examples\/grammar-parser.cpp/g' \
         -e 's/examples\/whisper\/whisper\.h/whisper.h/g' \
         -e 's/examples\/whisper\/whisper\.cpp/whisper.cpp/g' \
         -e 's/examples\/whisper\/main\.cpp/examples\/main\/main.cpp/g' \
index 3fc2678786895e408dcaa26b1a21b90f32edcb6a..1482cfbc752c422a539acd2c1c11bbebf12520eb 100755 (executable)
@@ -29,10 +29,12 @@ cp -rpv ../ggml/include/ggml/ggml.h         ./ggml.h
 cp -rpv ../ggml/include/ggml/ggml-alloc.h   ./ggml-alloc.h
 cp -rpv ../ggml/include/ggml/ggml-backend.h ./ggml-backend.h
 
-cp -rpv ../ggml/examples/common.h        ./examples/common.h
-cp -rpv ../ggml/examples/common.cpp      ./examples/common.cpp
-cp -rpv ../ggml/examples/common-ggml.h   ./examples/common-ggml.h
-cp -rpv ../ggml/examples/common-ggml.cpp ./examples/common-ggml.cpp
+cp -rpv ../ggml/examples/common.h                   ./examples/common.h
+cp -rpv ../ggml/examples/common.cpp                 ./examples/common.cpp
+cp -rpv ../ggml/examples/common-ggml.h              ./examples/common-ggml.h
+cp -rpv ../ggml/examples/common-ggml.cpp            ./examples/common-ggml.cpp
+cp -rpv ../ggml/examples/whisper/grammar-parser.h   ./examples/grammar-parser.h
+cp -rpv ../ggml/examples/whisper/grammar-parser.cpp ./examples/grammar-parser.cpp
 
 cp -rpv ../ggml/examples/whisper/whisper.h    ./whisper.h
 cp -rpv ../ggml/examples/whisper/whisper.cpp  ./whisper.cpp