source: lib/terms.m4 @ 3b02b04

Last change on this file since 3b02b04 was 5f4d9c3, checked in by Maciej Prill <mprill@…>, 13 years ago

Rewritten the build system, added lem UTF-8 version.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1divert(-1)
2#--------------------------------------------------------------------------
3
4# Macros defined here may be used in pattern specifications
5# You can modify this file according to your needs.
6
7# ENDOFSEGMENT and MORFIELD are macros expanded to, respectively,
8# end of segment marker (dependes on the format: flattened or not)
9# and the name of the annotation field containing morphological
10# information (standard value is 'lem'). These values are controlled
11# by programs using this file to expand search patterns (ser, grp, ...).
12
13# seg(type,form,annotation)
14
15define(`seg',`(\s*((\d+\s+)(\d+\s+)?)?dnl
16ifelse($1, `',`(\S+)', `($1)')\s+dnl
17ifelse($2, `',`(\S+)', `($2)')dnl
18ifelse($3, `',`((\s+\S+)*)', `(\s+($3))')\s*ENDOFSEGMENT)')
19
20# form(f) - segment containing the form f
21
22define(`form', `seg(,$1)')
23
24# field(f) segment containing auxiliary field f
25
26define(`field', `seg(,,`(\S+\s+)*($1)(\s+\S+)*')')
27
28# word, space, punct, number segments (assuming W, S, P, N segment types)
29
30define(`space', `seg(`S',`$1')')
31define(`word',  `seg(`W',`$1')')
32define(`punct', `seg(`P',`$1')')
33define(`number', `seg(`N',`$1')')
34
35# macros specific to PMDB format
36
37define(`lexeme', `field(`MORFIELD:(\S+;)?$1,\S+')')
38define(`cat', `field(`MORFIELD:\S+,$1([,;]\S+)?')')
39
40
41# Place here your macro definitions.
42
43
44
45
46
47
48
49
50
51#--------------------------------------------------------------------------
52divert(0)
Note: See TracBrowser for help on using the repository browser.