forked from leoalenc/pygf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPortuguese.gf
More file actions
35 lines (32 loc) · 1.79 KB
/
Portuguese.gf
File metadata and controls
35 lines (32 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-- PyGF - a multilingual computational grammar for Python and Portuguese
-- (c) 2022 Leonel Figueiredo de Alencar
-- Licensed under the terms of the GNU General Public License Version 3
-- See LICENSE or visit the URL
-- https://www.gnu.org/licenses/gpl-3.0.en.html
concrete Portuguese of Sem = open Oper in {
flags coding=utf8 ;
lincat
Command, Object, Integer, Value = EXPR ;
lin
Pop integer = {s = "extrair" ++ variants {"elemento" ; "item" ; "valor"} ++ "na posição" ++ integer.s ++ variants {"de uma" ; "duma"} ++ "lista"} ;
Count value = {s = variants {"contar" ; "determinar" ; "calcular"} ++ variants { "as" ; "o número de"} ++ "ocorrências de um" ++ value.s ++ variants {"numa" ; "em uma"} ++ "lista"} ;
Index value = {s = "determinar o índice de um" ++ value.s ++ variants {"numa" ; "em uma"} ++ "lista"} ;
Remove value = {s = "remover um" ++ value.s ++ variants {"de uma" ; "duma"} ++ "lista"} ;
Insert integer object = {s = "inserir um" ++ object.s ++ variants {"numa" ; "em uma"} ++ "lista na posição" ++ integer.s} ;
Reverse = {s = "inverter uma lista"} ;
Clear = {s = "limpar uma lista"} ;
Sort = {s = "ordenar uma lista"} ;
Int = {s = "número tal"} ;
Pos1 = {s = "1" | "um"} ;
Pos2 = {s = "2" | "dois"} ;
Pos3 = {s = "3" | "três"} ;
Neg1 = {s = "-1" | "menos 1" | "menos um"} ;
Neg2 = {s = "-2" | "menos 2" | "menos dois"} ;
Neg3 = {s = "-3" | "menos 3" | "menos três"} ;
Val = {s = "valor" | "elemento" | "item"} ;
Obj = {s = "objeto"} ;
Print object = {s = variants {"imprimir" ; "exibir"} ++ "um" ++ object.s ++ ")"} ;
Length object = {s = variants { "determinar" ; "calcular"} ++ variants { "o comprimento" ; "a extensão"} ++ variants {"de um" ; "dum"} ++ object.s} ;
mkObjInt integer = {s = integer.s} ;
mkObjVal value = {s = value.s} ;
}