tamgu

所属分类:内容生成
开发工具:C++
文件大小:83270KB
下载次数:0
上传日期:2023-05-25 08:43:01
上 传 者sh-1993
说明:  Tamgu(),一种FIL编程语言:用于注释和数据增强的函数、命令、逻辑一体化
(Tamgu ( ), a FIL programming language: Functional, Imperative, Logical all in one for annotation and data augmentation)

文件列表:
LICENSE (1538, 2023-09-17)
Makefile (4219, 2023-09-17)
NOTICE (27753, 2023-09-17)
Tamgu_license.txt (1488, 2023-09-17)
Xcode (0, 2023-09-17)
Xcode\tamgubase (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.pbxproj (84554, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\contents.xcworkspacedata (154, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcshareddata (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcshareddata\IDEWorkspaceChecks.plist (238, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcuserdata (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcuserdata\roux.xcuserdatad (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcuserdata\roux.xcuserdatad\UserInterfaceState.xcuserstate (247769, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcuserdata\rouxclaude.xcuserdatad (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\project.xcworkspace\xcuserdata\rouxclaude.xcuserdatad\UserInterfaceState.xcuserstate (55760, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\roux.xcuserdatad (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\roux.xcuserdatad\xcdebugger (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\roux.xcuserdatad\xcdebugger\Breakpoints_v2.xcbkptlist (1639, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\roux.xcuserdatad\xcschemes (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\roux.xcuserdatad\xcschemes\tamgubase.xcscheme (4737, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\roux.xcuserdatad\xcschemes\xcschememanagement.plist (481, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\rouxclaude.xcuserdatad (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\rouxclaude.xcuserdatad\xcdebugger (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\rouxclaude.xcuserdatad\xcdebugger\Breakpoints_v2.xcbkptlist (917, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\rouxclaude.xcuserdatad\xcschemes (0, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\rouxclaude.xcuserdatad\xcschemes\tamgubase.xcscheme (3427, 2023-09-17)
Xcode\tamgubase\tamgubase.xcodeproj\xcuserdata\rouxclaude.xcuserdatad\xcschemes\xcschememanagement.plist (481, 2023-09-17)
Xcode\tamgubase\tamgubase (0, 2023-09-17)
Xcode\tamgubase\tamgubase\main.cpp (277, 2023-09-17)
Xcode\tamgugui (0, 2023-09-17)
Xcode\tamgugui\OptimizationProfiles (0, 2023-09-17)
Xcode\tamgugui\OptimizationProfiles\Tamgu.profdata (12567760, 2023-09-17)
Xcode\tamgugui\Tamgu.xcodeproj (0, 2023-09-17)
... ...

# TAMGU (): A FIL Language TAMGU is a __FIL__ programming language: __Functional, Imperative and Logical__. TAMGU is a _multithreaded programming language_ that provides: * an _imperative_ formalism close to Python, but with a strong and powerful type system. * a _functional_ formalism inspired by Haskell, which can freely mix with the _imperative_ paradigm * a _logical_ formalism inspired by Prolog, which can freely mix with the _imperative_ and _functional_ paradigms _For each specific problem in your programming, choose the most appropriate formalism and freely mix functional, imperative and logical approaches to implement the most expressive but also the most compact code possible._ ### Annotation TAMGU provides also an annotation language implementation (see below for an example), which allows for an efficient way to detect complex patterns in text. The language provides many features but also many libraries, which helps design and implement annotation schemes for complex documents. ## Code Example Below is an example of the kind of code that you can implement with _Tamgu_. ```C++ //An imperative language int i=10; string s="20"; ------------------------------------------------------------------------------------ //Containers map m = {'a':1, 'b':2}; //all sorts of containers treemap t = {"u":10, 'v':'toto'}; vector v = [1,2,3,"a","b"]; ivector iv = [1..10]; //iv = [1,2,3,4,5,6,7,8,9,10] iv = [1,3..10]; //iv = [1,3,5,9] ------------------------------------------------------------------------------------ //Functions, threads and frames function mycall(int i, string s) {...} //functions thread mythread(int i, string s) {...} //threads frame myclass {...} //class definition ------------------------------------------------------------------------------------ //Native Korean string support s=" Quiz"; if (s[0].ishangul()) println("Ok"); uvector dec = s.jamo(); //['','','','','','','','',''...] dec = s.romanization(); //['-/ng','e','b','eo','r/l','ae','n','d',...] ------------------------------------------------------------------------------------ //Functional approach based on Haskell ivector iv = [1..20]; //a list of integers between 1 and 20 iv.shuffle(); //The order of the elements is now random. ; //if the list is empty, we return an empty "list" ), //we sort the list with elements smaller than fv let maxlist = fastsort(fv) v>)>; //we sort the list with elements larger than fv //we can call a functional definition as regular code v=fastsort(iv); ------------------------------------------------------------------------------------ //Predicates concat([],?X,?X). concat([?H|?T],?Y, [?H|?Z]) :- concat(?T,?Y,?Z). //You can mix freely your predicate definition with some regular tamgu code v=concat(["english",'russian',"french"],['spanish'],?L); println(v); //["english",'russian',"french","spanish"] ``` ## Annotation Example Tamgu also provides an integrated rule mechanism, which combines both lexicons and rules to detect complex patterns in texts. ```Java //We define some lexical rules (starting with a "@") @food <- burger. @food <- tartare. //Our rule: if "the food" word is found in a sentence, then we return a "meal" label meal <- "the", #food. //We need a specific object to scan a sentence annotator r; //a sentence string sentence="Here, the burger and the tartare are delicious."; vector v = r.parse(sentence); //Result: v = [['meal',[10,16]],['meal',[25,32]]] //It reads: two 'meal' were found at position 10-16 and position 25-32... ``` ## Pre-compiled Releases __Note__: _Releases_ for Windows, Mac OS and Linux are available at: https://github.com/naver/tamgu/releases ## Documentation The documentation is available in : **[English Documentation](https://github.com/naver/tamgu/blob/master/documentations/English/README.md)** **[ ](https://github.com/naver/tamgu/blob/master/documentations/Korean/README.md)** ## Examples Examples are available both as a folder: https://github.com/naver/tamgu/tree/master/examples or as an archive in: https://github.com/naver/tamgu/releases/tag/tamgu.examples. ## Compiling The TAMGU project has been implemented in C++. It can be compiled on most platforms: * Windows: see https://github.com/naver/tamgu/wiki/1.1-Compiling-on-Windows * Mac OS: see https://github.com/naver/tamgu/wiki/1.2-Compiling-on-Mac-OS * Linux: see https://github.com/naver/tamgu/wiki/1.3-Compiling-on-Linux ### Libraries Tamgu also provides different libraries: Compiling libraries: https://github.com/naver/tamgu/wiki/1.4-Compiling-libraries-(Linux-&-Mac-OS) #### Windows requirements for: libsound and libwapti These two libraries need the following DLL on Windows, which you can obtained from: _http://www.mingw.org_ ``` libgcc_s_sjlj-1.dll libltdl-7.dll libstdc++-6.dll libwinpthread-1.dll ``` ### Python Furthermore, Tamgu provides a bi-directional library, which can be used to execute Tamgu code from Python (and conversely, Python code in Tamgu) See: https://github.com/naver/tamgu/wiki/1.5-Compiling-Python for more information ## License ``` BSD 3-Clause License Copyright (c) 2019-present NAVER Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Naver Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ```

近期下载者

相关文件


收藏者