File: prime08.rb

package info (click to toggle)
prime 1.0.0.1-2.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,420 kB
  • sloc: ruby: 7,139; lisp: 1,866; sh: 442; makefile: 242
file content (93 lines) | stat: -rw-r--r-- 2,299 bytes parent folder | download | duplicates (4)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# prime08.rb: Module for the PRIME 0.8 protocol
# $Id: prime08.rb,v 1.2 2005/03/07 07:51:32 komatsu Exp $
#
# Copyright (C) 2005 Hiroyuki Komatsu <komatsu@taiyaki.org>
#     All rights reserved.
#     This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of 
# the GNU General Public License version 2.

module Prime08
  def initialize_prime08 ()
    @session_prime08 = PrimeSessionPrime08.new()
  end

  def close ()
    @session_prime08.close()
  end
  def update ()
    @session_prime08.update()
  end
  def refresh ()
    initialize_rc()
    @session_prime08.refresh()
  end

  def get_label (pattern)
    return @session_prime08.get_label(pattern)
  end

  def preedit_convert_input (pattern)
    return @session_prime08.preedit_convert_input(pattern)
  end

  def set_context (context)
    @session_prime08.set_context(context)
  end

  def learn_word (pron, literal, pos = "",
                  context = "", suffix = "", rest = "")
    @session_prime08.learn_word(pron, literal, pos, context, suffix, rest)
  end

  def lookup (string)
    return @session_prime08.lookup(string)
  end
  def lookup_all (string)
    return @session_prime08.lookup_all(string)
  end

  def lookup_hybrid (string)
    return @session_prime08.lookup_hybrid(string)
  end
  def lookup_hybrid_all (string)
    return @session_prime08.lookup_hybrid_all(string)
  end

  def lookup_direct (string)
    return @session_prime08.lookup_direct(string)
  end
  def lookup_direct_all (string)
    return @session_prime08.lookup_direct_all(string)
  end

  def lookup_compact (string)
    return @session_prime08.lookup_compact(string)
  end
  def lookup_compact_all (string)
    return @session_prime08.lookup_compact_all(string)
  end

  def lookup_prefix (string)
    return @session_prime08.lookup_prefix(string)
  end
  def lookup_prefix_ex (string)
    return @session_prime08.lookup_prefix_ex(string)
  end

  def lookup_exact (string)
    return @session_prime08.lookup_exact(string)
  end

  def lookup_overall (string)
    return @session_prime08.lookup_overall(string)
  end

  def lookup_expansion (string)
    return @session_prime08.lookup_expansion(string)
  end
  def lookup_mixed (string)
    return @session_prime08.lookup_mixed(string)
  end
end