File: lexname.py

package info (click to toggle)
w3af 1.0-rc3svn3489-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 59,908 kB
  • ctags: 16,916
  • sloc: python: 136,990; xml: 63,472; sh: 153; ruby: 94; makefile: 40; asm: 35; jsp: 32; perl: 18; php: 5
file content (79 lines) | stat: -rw-r--r-- 2,275 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Natural Language Toolkit: Wordnet Interface
#
# Copyright (C) 2001-2009 NLTK Project
# Author: Oliver Steele <steele@osteele.com>
#         David Ormiston Smith <daosmith@csse.unimelb.edu.au>>
#         Steven Bird <sb@csse.unimelb.edu.au>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT

from util import *

# Lexname class

class Lexname(object):
   dict = {}
   lexnames = []
   
   def __init__(self, name, category):
       self.name = name
       self.category = category
       self.id = len(Lexname.dict)
       Lexname.dict[name] = self
       Lexname.lexnames.append(self)
   
   def __str__(self):
       return self.name

   __repr__ = __str__

# Create Lexname objects, originally sourced from the lexnames file available
# as a patch from the Pywordnet sourceforge site. This list may be updated by
# the creators of Wordnet at any time.
# It must remain in the given order:

Lexname("adj.all", ADJECTIVE)
Lexname("adj.pert", ADJECTIVE)
Lexname("adv.all", ADVERB)
Lexname("noun.Tops", NOUN)
Lexname("noun.act", NOUN)
Lexname("noun.animal", NOUN)
Lexname("noun.artifcact", NOUN)
Lexname("noun.attribute", NOUN)
Lexname("noun.body", NOUN)
Lexname("noun.cognition", NOUN)
Lexname("noun.communication", NOUN)
Lexname("noun.event", NOUN)
Lexname("noun.feeling", NOUN)
Lexname("noun.food", NOUN)
Lexname("noun.group", NOUN)
Lexname("noun.location", NOUN)
Lexname("noun.motive", NOUN)
Lexname("noun.object", NOUN)
Lexname("noun.person", NOUN)
Lexname("noun.phenomenon", NOUN)
Lexname("noun.plant", NOUN)
Lexname("noun.possession", NOUN)
Lexname("noun.process", NOUN)
Lexname("noun.quantity", NOUN)
Lexname("noun.relation", NOUN)
Lexname("noun.shape", NOUN)
Lexname("noun.state", NOUN)
Lexname("noun.substance", NOUN)
Lexname("noun.time", NOUN)
Lexname("verb.body", VERB)
Lexname("verb.change", VERB)
Lexname("verb.cognition", VERB)
Lexname("verb.communication", VERB)
Lexname("verb.competition", VERB)
Lexname("verb.consumption", VERB)
Lexname("verb.contact", VERB)
Lexname("verb.creation", VERB)
Lexname("verb.emotion", VERB)
Lexname("verb.motion", VERB)
Lexname("verb.perception", VERB)
Lexname("verb.possession", VERB)
Lexname("verb.social", VERB)
Lexname("verb.stative", VERB)
Lexname("verb.weather", VERB)
Lexname("adj.ppl", ADJECTIVE)