PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
stem_UTF_8_arabic.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct SN_envarabic_UTF_8_create_env (void)
 
void arabic_UTF_8_close_env (struct SN_env *z)
 
int arabic_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ arabic_UTF_8_close_env()

void arabic_UTF_8_close_env ( struct SN_env z)

Definition at line 1663 of file stem_UTF_8_arabic.c.

1663 { SN_close_env(z, 0); }
void SN_close_env(struct SN_env *z, int S_size)
Definition: api.c:34

References SN_close_env().

◆ arabic_UTF_8_create_env()

struct SN_env* arabic_UTF_8_create_env ( void  )

Definition at line 1661 of file stem_UTF_8_arabic.c.

1661 { return SN_create_env(0, 3); }
struct SN_env * SN_create_env(int S_size, int I_size)
Definition: api.c:3

References SN_create_env().

◆ arabic_UTF_8_stem()

int arabic_UTF_8_stem ( struct SN_env z)

Definition at line 1414 of file stem_UTF_8_arabic.c.

1414  {
1415  z->I[2] = 1;
1416  z->I[1] = 1;
1417  z->I[0] = 0;
1418  { int c1 = z->c;
1419  { int ret = r_Checks1(z);
1420  if (ret < 0) return ret;
1421  }
1422  z->c = c1;
1423  }
1424 
1425  { int ret = r_Normalize_pre(z);
1426  if (ret < 0) return ret;
1427  }
1428  z->lb = z->c; z->c = z->l;
1429 
1430  { int m2 = z->l - z->c; (void)m2;
1431  { int m3 = z->l - z->c; (void)m3;
1432  if (!(z->I[1])) goto lab2;
1433  { int m4 = z->l - z->c; (void)m4;
1434  { int i = 1;
1435  while(1) {
1436  int m5 = z->l - z->c; (void)m5;
1437  { int ret = r_Suffix_Verb_Step1(z);
1438  if (ret == 0) goto lab5;
1439  if (ret < 0) return ret;
1440  }
1441  i--;
1442  continue;
1443  lab5:
1444  z->c = z->l - m5;
1445  break;
1446  }
1447  if (i > 0) goto lab4;
1448  }
1449  { int m6 = z->l - z->c; (void)m6;
1450  { int ret = r_Suffix_Verb_Step2a(z);
1451  if (ret == 0) goto lab7;
1452  if (ret < 0) return ret;
1453  }
1454  goto lab6;
1455  lab7:
1456  z->c = z->l - m6;
1457  { int ret = r_Suffix_Verb_Step2c(z);
1458  if (ret == 0) goto lab8;
1459  if (ret < 0) return ret;
1460  }
1461  goto lab6;
1462  lab8:
1463  z->c = z->l - m6;
1464  { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
1465  if (ret < 0) goto lab4;
1466  z->c = ret;
1467  }
1468  }
1469  lab6:
1470  goto lab3;
1471  lab4:
1472  z->c = z->l - m4;
1473  { int ret = r_Suffix_Verb_Step2b(z);
1474  if (ret == 0) goto lab9;
1475  if (ret < 0) return ret;
1476  }
1477  goto lab3;
1478  lab9:
1479  z->c = z->l - m4;
1480  { int ret = r_Suffix_Verb_Step2a(z);
1481  if (ret == 0) goto lab2;
1482  if (ret < 0) return ret;
1483  }
1484  }
1485  lab3:
1486  goto lab1;
1487  lab2:
1488  z->c = z->l - m3;
1489  if (!(z->I[2])) goto lab10;
1490  { int m7 = z->l - z->c; (void)m7;
1491  { int m8 = z->l - z->c; (void)m8;
1492  { int ret = r_Suffix_Noun_Step2c2(z);
1493  if (ret == 0) goto lab13;
1494  if (ret < 0) return ret;
1495  }
1496  goto lab12;
1497  lab13:
1498  z->c = z->l - m8;
1499 
1500  if (!(z->I[0])) goto lab15;
1501  goto lab14;
1502  lab15:
1503  { int ret = r_Suffix_Noun_Step1a(z);
1504  if (ret == 0) goto lab14;
1505  if (ret < 0) return ret;
1506  }
1507  { int m9 = z->l - z->c; (void)m9;
1508  { int ret = r_Suffix_Noun_Step2a(z);
1509  if (ret == 0) goto lab17;
1510  if (ret < 0) return ret;
1511  }
1512  goto lab16;
1513  lab17:
1514  z->c = z->l - m9;
1515  { int ret = r_Suffix_Noun_Step2b(z);
1516  if (ret == 0) goto lab18;
1517  if (ret < 0) return ret;
1518  }
1519  goto lab16;
1520  lab18:
1521  z->c = z->l - m9;
1522  { int ret = r_Suffix_Noun_Step2c1(z);
1523  if (ret == 0) goto lab19;
1524  if (ret < 0) return ret;
1525  }
1526  goto lab16;
1527  lab19:
1528  z->c = z->l - m9;
1529  { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
1530  if (ret < 0) goto lab14;
1531  z->c = ret;
1532  }
1533  }
1534  lab16:
1535  goto lab12;
1536  lab14:
1537  z->c = z->l - m8;
1538  { int ret = r_Suffix_Noun_Step1b(z);
1539  if (ret == 0) goto lab20;
1540  if (ret < 0) return ret;
1541  }
1542  { int m10 = z->l - z->c; (void)m10;
1543  { int ret = r_Suffix_Noun_Step2a(z);
1544  if (ret == 0) goto lab22;
1545  if (ret < 0) return ret;
1546  }
1547  goto lab21;
1548  lab22:
1549  z->c = z->l - m10;
1550  { int ret = r_Suffix_Noun_Step2b(z);
1551  if (ret == 0) goto lab23;
1552  if (ret < 0) return ret;
1553  }
1554  goto lab21;
1555  lab23:
1556  z->c = z->l - m10;
1557  { int ret = r_Suffix_Noun_Step2c1(z);
1558  if (ret == 0) goto lab20;
1559  if (ret < 0) return ret;
1560  }
1561  }
1562  lab21:
1563  goto lab12;
1564  lab20:
1565  z->c = z->l - m8;
1566 
1567  if (!(z->I[0])) goto lab25;
1568  goto lab24;
1569  lab25:
1570  { int ret = r_Suffix_Noun_Step2a(z);
1571  if (ret == 0) goto lab24;
1572  if (ret < 0) return ret;
1573  }
1574  goto lab12;
1575  lab24:
1576  z->c = z->l - m8;
1577  { int ret = r_Suffix_Noun_Step2b(z);
1578  if (ret == 0) { z->c = z->l - m7; goto lab11; }
1579  if (ret < 0) return ret;
1580  }
1581  }
1582  lab12:
1583  lab11:
1584  ;
1585  }
1586  { int ret = r_Suffix_Noun_Step3(z);
1587  if (ret == 0) goto lab10;
1588  if (ret < 0) return ret;
1589  }
1590  goto lab1;
1591  lab10:
1592  z->c = z->l - m3;
1593  { int ret = r_Suffix_All_alef_maqsura(z);
1594  if (ret == 0) goto lab0;
1595  if (ret < 0) return ret;
1596  }
1597  }
1598  lab1:
1599  lab0:
1600  z->c = z->l - m2;
1601  }
1602  z->c = z->lb;
1603  { int c11 = z->c;
1604  { int c12 = z->c;
1605  { int ret = r_Prefix_Step1(z);
1606  if (ret == 0) { z->c = c12; goto lab27; }
1607  if (ret < 0) return ret;
1608  }
1609  lab27:
1610  ;
1611  }
1612  { int c13 = z->c;
1613  { int ret = r_Prefix_Step2(z);
1614  if (ret == 0) { z->c = c13; goto lab28; }
1615  if (ret < 0) return ret;
1616  }
1617  lab28:
1618  ;
1619  }
1620  { int c14 = z->c;
1621  { int ret = r_Prefix_Step3a_Noun(z);
1622  if (ret == 0) goto lab30;
1623  if (ret < 0) return ret;
1624  }
1625  goto lab29;
1626  lab30:
1627  z->c = c14;
1628  if (!(z->I[2])) goto lab31;
1629  { int ret = r_Prefix_Step3b_Noun(z);
1630  if (ret == 0) goto lab31;
1631  if (ret < 0) return ret;
1632  }
1633  goto lab29;
1634  lab31:
1635  z->c = c14;
1636  if (!(z->I[1])) goto lab26;
1637  { int c15 = z->c;
1638  { int ret = r_Prefix_Step3_Verb(z);
1639  if (ret == 0) { z->c = c15; goto lab32; }
1640  if (ret < 0) return ret;
1641  }
1642  lab32:
1643  ;
1644  }
1645  { int ret = r_Prefix_Step4_Verb(z);
1646  if (ret == 0) goto lab26;
1647  if (ret < 0) return ret;
1648  }
1649  }
1650  lab29:
1651  lab26:
1652  z->c = c11;
1653  }
1654 
1655  { int ret = r_Normalize_post(z);
1656  if (ret < 0) return ret;
1657  }
1658  return 1;
1659 }
int i
Definition: isn.c:72
static int r_Prefix_Step2(struct SN_env *z)
static int r_Prefix_Step3b_Noun(struct SN_env *z)
static int r_Suffix_Noun_Step2c2(struct SN_env *z)
static int r_Prefix_Step3a_Noun(struct SN_env *z)
static int r_Suffix_Noun_Step2c1(struct SN_env *z)
static int r_Suffix_Verb_Step2c(struct SN_env *z)
static int r_Suffix_Verb_Step2b(struct SN_env *z)
static int r_Prefix_Step1(struct SN_env *z)
static int r_Suffix_Verb_Step1(struct SN_env *z)
static int r_Checks1(struct SN_env *z)
static int r_Suffix_Noun_Step3(struct SN_env *z)
static int r_Prefix_Step4_Verb(struct SN_env *z)
static int r_Prefix_Step3_Verb(struct SN_env *z)
static int r_Normalize_pre(struct SN_env *z)
static int r_Suffix_Noun_Step2a(struct SN_env *z)
static int r_Suffix_Verb_Step2a(struct SN_env *z)
static int r_Suffix_Noun_Step1a(struct SN_env *z)
static int r_Suffix_Noun_Step1b(struct SN_env *z)
static int r_Suffix_All_alef_maqsura(struct SN_env *z)
static int r_Suffix_Noun_Step2b(struct SN_env *z)
static int r_Normalize_post(struct SN_env *z)
int lb
Definition: api.h:16
symbol * p
Definition: api.h:15
int * I
Definition: api.h:18
int c
Definition: api.h:16
int l
Definition: api.h:16
int skip_b_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:52

References SN_env::c, i, SN_env::I, SN_env::l, SN_env::lb, SN_env::p, r_Checks1(), r_Normalize_post(), r_Normalize_pre(), r_Prefix_Step1(), r_Prefix_Step2(), r_Prefix_Step3_Verb(), r_Prefix_Step3a_Noun(), r_Prefix_Step3b_Noun(), r_Prefix_Step4_Verb(), r_Suffix_All_alef_maqsura(), r_Suffix_Noun_Step1a(), r_Suffix_Noun_Step1b(), r_Suffix_Noun_Step2a(), r_Suffix_Noun_Step2b(), r_Suffix_Noun_Step2c1(), r_Suffix_Noun_Step2c2(), r_Suffix_Noun_Step3(), r_Suffix_Verb_Step1(), r_Suffix_Verb_Step2a(), r_Suffix_Verb_Step2b(), r_Suffix_Verb_Step2c(), and skip_b_utf8().