• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created over 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tamgu (탐구), a FIL programming language: Functional, Imperative, Logical all in one for annotation and data augmentation

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.

//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.

<fastsort([]) = []>;  //if the list is empty, we return an empty "list"
<fastsort([fv:v]) =  minlist &&& fv &&& maxlist where //we merge the different list...
    let minlist = fastsort(<filter (<=fv) v>), //we sort the list with elements smaller than fv
    let maxlist = fastsort(<filter (>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.

//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 in : tamgu.pdf

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:

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.

More Repositories

1

billboard.js

📊 Re-usable, easy interface JavaScript chart library based on D3.js
TypeScript
5,812
star
2

fe-news

FE 기술 소식 큐레이션 뉴스레터
5,635
star
3

dust3r

DUSt3R: Geometric 3D Vision Made Easy
Python
4,919
star
4

egjs-flicking

🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.
TypeScript
2,551
star
5

egjs-infinitegrid

A module used to arrange card elements including content infinitely on a grid layout.
TypeScript
2,187
star
6

ngrinder

enterprise level performance testing solution
Java
1,788
star
7

d2codingfont

D2 Coding 글꼴
1,774
star
8

egjs

Javascript components group that brings easiest and fastest way to build a web application in your way.
JavaScript
922
star
9

splade

SPLADE: sparse neural search (SIGIR21, SIGIR22)
Python
748
star
10

mast3r

Grounding Image Matching in 3D with MASt3R
Python
731
star
11

biobert-pretrained

BioBERT: a pre-trained biomedical language representation model for biomedical text mining
651
star
12

deep-image-retrieval

End-to-end learning of deep visual representations for image retrieval
Python
643
star
13

sqlova

Python
631
star
14

fixture-monkey

Let Fixture Monkey generate test instances including edge cases automatically
Java
549
star
15

roma

RoMa: A lightweight library to deal with 3D rotations in PyTorch.
Python
493
star
16

r2d2

Python
468
star
17

kapture

kapture is a file format as well as a set of tools for manipulating datasets, and in particular Visual Localization and Structure from Motion data.
Python
466
star
18

egjs-view360

360 integrated viewing solution
TypeScript
438
star
19

scavenger

A runtime dead code analysis tool
Java
400
star
20

yobi

Project hosting software - Deprecated
Java
379
star
21

lispe

An implementation of a full fledged Lisp interpreter with Data Structure, Pattern Programming and High level Functions with Lazy Evaluation à la Haskell.
C
369
star
22

lucy-xss-filter

HTML
319
star
23

arcus

ARCUS is the NAVER memcached with lists, sets, maps and b+trees. http://naver.github.io/arcus
Shell
302
star
24

egjs-grid

A component that can arrange items according to the type of grids
TypeScript
275
star
25

spring-jdbc-plus

Spring JDBC Plus
Java
274
star
26

kapture-localization

Provide mapping and localization pipelines based on kapture format
Python
266
star
27

android-imagecropview

android image crop library
Java
250
star
28

croco

Python
249
star
29

smarteditor2

Javascript WYSIWYG HTML editor
JavaScript
241
star
30

lucy-xss-servlet-filter

Java
237
star
31

kor2vec

OOV없이 빠르고 정확한 한국어 Embedding 라이브러리
Python
219
star
32

claf

CLaF: Open-Source Clova Language Framework
Python
215
star
33

eslint-config-naver

Naver JavaScript Coding Conventions rules for eslint
JavaScript
205
star
34

egjs-view3d

Fast & customizable 3D model viewer for everyone
TypeScript
192
star
35

multi-hmr

Pytorch demo code and models for Multi-HMR
Python
178
star
36

nlp-challenge

NLP Shared tasks (NER, SRL) using NSML
Python
177
star
37

hackday-conventions-java

캠퍼스 핵데이 Java 코딩 컨벤션
173
star
38

nbase-arc

nbase-arc is an open source distributed memory store based on Redis
C
171
star
39

nanumfont

170
star
40

egjs-axes

A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates.
TypeScript
150
star
41

cgd

Combination of Multiple Global Descriptors for Image Retrieval
Python
147
star
42

naver-openapi-guide

CSS
135
star
43

volley-extensions

Volley Extensions v2.0.0. ( Volleyer, Volley requests, Volley caches, Volley custom views )
Java
134
star
44

fire

Python
128
star
45

tldr

TLDR is an unsupervised dimensionality reduction method that combines neighborhood embedding learning with the simplicity and effectiveness of recent self-supervised learning losses
Python
123
star
46

pr-stats

PR에 대한 유용한 통계를 산출하는 GitHub Actions
TypeScript
122
star
47

PoseGPT

Python
119
star
48

grabcutios

Image segmentation using GrabCut algorithm for iOS
C++
118
star
49

sling

C++
117
star
50

gdc

Code accompanying our papers on the "Generative Distributional Control" framework
Python
116
star
51

naveridlogin-sdk-android

네이버 아이디로 로그인 SDK (안드로이드)
Kotlin
114
star
52

posescript

Python
114
star
53

egjs-conveyer

Conveyer adds Drag gestures to your Native Scroll.
TypeScript
113
star
54

spring-batch-plus

Add useful features to spring batch
Kotlin
111
star
55

cfcs

Write once, create framework components that supports React, Vue, Svelte, and more.
TypeScript
102
star
56

egjs-agent

Extracts browser and operating system information from the user agent string or user agent object(userAgentData).
TypeScript
100
star
57

searchad-apidoc

Java
98
star
58

dope

Python
92
star
59

bergen

Benchmarking library for RAG
Jupyter Notebook
88
star
60

imagestabilizer

C++
77
star
61

guitar

AutoIt
75
star
62

arcus-memcached

ARCUS memory cache server
C
71
star
63

disco

A Toolkit for Distributional Control of Generative Models
Python
68
star
64

prism-live-studio

C++
63
star
65

cover-checker

Check your pull request code coverage
Java
63
star
66

egjs-list-differ

➕➖🔄 A module that checks the diff when values are added, removed, or changed in an array.
TypeScript
63
star
67

storybook-addon-preview

Storybook Addon Preview can show user selected knobs in various framework code in Storybook
TypeScript
63
star
68

svc

Easy and intuitive pattern for Android
Kotlin
62
star
69

egjs-imready

I'm Ready to check if the images or videos are loaded!
TypeScript
60
star
70

egjs-flicking-plugins

Plugins for @egjs/flicking
TypeScript
60
star
71

naveridlogin-sdk-ios

Objective-C
59
star
72

garnet

Python
57
star
73

clova-face-kit

On-device lightweight face recognition. Available on Android, iOS, WASM, Python.
57
star
74

rye

RYE, Native Sharding RDBMS
C
54
star
75

hubblemon

Python
54
star
76

zeplin-flutter-gen

🚀The Flutter dart code generator from zeplin. ex) Container, Text, Color, TextStyle, ... - Save your time.
JavaScript
53
star
77

egjs-visible

A class that checks if an element is visible in the base element or viewport.
HTML
52
star
78

arcus-java-client

ARCUS Java client
Java
50
star
79

aqm-plus

PyTorch code for Large-Scale Answerer in Questioner's Mind for Visual Dialog Question Generation (AQM+) (ICLR 2019)
Python
50
star
80

isometrizer

Isometrizer turns your DOM elements into isometric projection
TypeScript
48
star
81

artemis

Official code release for ARTEMIS: Attention-based Retrieval with Text-Explicit Matching and Implicit Similarity (published at ICLR 2022)
Python
46
star
82

jindojs-jindo

Jindo JavaScript Framework
JavaScript
44
star
83

covid19-nmt

Multi-lingual & multi-domain (specialisation for biomedical data) translation model
Python
40
star
84

react-sample-code

이 프로젝트는 hello world에 공개한 React 개발 가이드에 필요한 샘플 코드입니다.
JavaScript
39
star
85

pump

Python
39
star
86

posebert

Python
39
star
87

passport-naver

A passport strategy for Naver OAuth 2.0
JavaScript
38
star
88

hadoop

Public hadoop release repository
Java
38
star
89

kaist-oss-course

Introduction to Open Source Software class @ KAIST 2016
38
star
90

egjs-component

A class used to manage events in a component like DOM
TypeScript
38
star
91

graphql-dataloader-mongoose

graphql-dataloader-mongoose is a DataLoader generator based on an existing Mongoose model
TypeScript
38
star
92

egjs-persist

Provide cache interface to handle persisted data among history navigation.
JavaScript
38
star
93

shine

[CVPR'24 Highlight] SHiNe: Semantic Hierarchy Nexus for Open-vocabulary Object Detection
Python
36
star
94

naver-spring-batch-ex

Java
33
star
95

naverspeech-sdk-ios

Swift
32
star
96

reflect

C++ class reflection library without RTTI.
C++
32
star
97

android-utilset

Utilset is collections of useful functions to save your valuable time.
Java
32
star
98

cafe-sdk-unity

31
star
99

image-maps

jquery plugin which can be partially linked to the image
JavaScript
31
star
100

mesh-simplifier

Collection of mesh simplification methods written in Typescript
TypeScript
30
star