-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathРабочая_версия_20_05_5_00.txt
609 lines (516 loc) · 22 KB
/
Рабочая_версия_20_05_5_00.txt
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
package hypergraphDB;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import hypergraphDB.Relations;
import javafx.application.Application;
import org.hypergraphdb.HGConfiguration;
import org.hypergraphdb.HGEnvironment;
import org.hypergraphdb.HGQuery.hg;
import org.hypergraphdb.HyperGraph;
import org.hypergraphdb.algorithms.DefaultALGenerator;
import org.hypergraphdb.algorithms.HGALGenerator;
import org.hypergraphdb.algorithms.HGBreadthFirstTraversal;
import org.hypergraphdb.algorithms.HGTraversal;
import org.hypergraphdb.app.wordnet.HGWordNetLoader;
import org.hypergraphdb.app.wordnet.SemTools;
import org.hypergraphdb.HGHandle;
import org.hypergraphdb.HGPlainLink;
import org.hypergraphdb.app.wordnet.WNGraph;
import org.hypergraphdb.app.wordnet.data.*;
import org.hypergraphdb.app.wordnet.ext.ConceptualDensity;
import org.hypergraphdb.util.Pair;
import static java.nio.charset.StandardCharsets.*;
import javafx.collections.ObservableList;
import javafx.scene.control.ListView;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.text.TextFlow;
import javafx.scene.control.TextField;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.Border;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.scene.Group;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Tooltip;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.KeyCode;
import javafx.collections.FXCollections;
import javafx.scene.control.cell.ComboBoxListCell;
import javafx.scene.control.ChoiceBox;
import javafx.beans.value.ObservableValue;
import javafx.beans.value.ChangeListener;
import java.awt.Color;
import java.lang.reflect.Field;
import java.net.URL;
public class Main extends Application {
public static List<HGHandle> NounList;
public static List<HGHandle> VerbList;
public static List<HGHandle> AdjList;
public static List<HGHandle> AdverbList;
public static HyperGraph graph;
public static HyperGraph englishGraph;
public static HyperGraph russianGraph;
public static WNGraph wnGraph;
public static WNGraph englishWNGraph;
public static WNGraph russianWNGraph;
public static HGHandle wordH;
public static HGHandle reqWord;
public static int languageNum = 0; // 0 - Àíãëèéñêèé, 1 - Ðóññêèé.
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("WordNet Editor");
ViewElements viewElements = new ViewElements();
String[] notFoundLabel = {"Not found\n", "Íå íàéäåíî\n"};
TextField wordSearchField = new TextField();
wordSearchField.setPrefSize(150, 20);
TextFlow wordMeaningArea = new TextFlow();
wordMeaningArea.setMaxSize(400,400);
wordMeaningArea.setPrefSize(400,400);
Button searchButton = new Button();
searchButton.setText("Search");
ChoiceBox<String> cb = new ChoiceBox<String>(FXCollections.observableArrayList("EnWordNet", "RUWordNet"));
cb.getSelectionModel().selectFirst();
cb.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue ov, Number value, Number new_value) {
if (ov.getValue() == "EnWordnet") {
graph = englishGraph;
wnGraph = englishWNGraph;
languageNum = 0;
searchButton.setText("Search");
}
else {
graph = russianGraph;
wnGraph = russianWNGraph;
languageNum = 1;
searchButton.setText("Ïîèñê");
}
}
});
Button enWordnetButton = new Button();
enWordnetButton.setText("EnWordNet");
Button ruWordnetButton = new Button();
ruWordnetButton.setText("RuWordnet");
Text[] NounHeader = {new Text("Noun:\n"), new Text("Ñóùåñòâèòåëüíîå:\n")};
Text[] VerbHeader = {new Text("Verb: \n"), new Text("Ãëàãîë:\n")};
Text[] AdjHeader = {new Text("Adjective: \n"), new Text("Ïðèëàãàòåëüíîå:\n")};
Text[] AdverbHeader = {new Text("Adverb: \n"), new Text("Íàðå÷èå:\n")};
Text[][] headers = {NounHeader, VerbHeader, AdjHeader, AdverbHeader};
String style = "-fx-font-weight: bold";
viewElements.createHeader(headers, style);
// extText[] exampHeader = {new extText(" Examples: "), new extText(" Ïðèìåðû: ")};
// for (int i = 0; i < 2; i++) {
// exampHeader[i].setFont(new Font(12));
// exampHeader[i].setStyle("-fx-font-style: italic");
// }
// //Getting and printing synonyms of the word "dog".
// List<String> synonyms = new ArrayList<String>();
// String synString = null; // String of synonyms in one line
// HGHandle dogHandle = wnGraph.findWord("dog");
// Word dogWord = graph.get(dogHandle); // Target word
// List<SynsetLink> dogSenses = hg.getAll(graph,hg.and(hg.type(NounSynsetLink.class),
// hg.incident(dogHandle)));
//
// for (SynsetLink dogSense : dogSenses) {
// System.out.println("Synonyms that mean '" + dogSense.getGloss() + "':");
// dogSense.forEach(h -> {
// Word tmpWord = graph.get(h);
// if (!tmpWord.equals(dogWord))
// synonyms.add(tmpWord.getLemma());
// });
// synString = String.join(",", synonyms) + ".";
// System.out.println(synString);
// }
// // Finding the word "big"
// HGHandle bigWord = wnGraph.findWord("big");
// // Getting all senses of the word
// List<SynsetLink> adjSenseList = hg.getAll(graph,hg.and(hg.type(AdjSynsetLink.class),
// hg.incident(bigWord)));
// // Getting the only meaning that has antonyms. It is number 9 (according to tests)
// SynsetLink senseWithAntonyms = adjSenseList.get(9);
// // Getting the list of antonyms
// List<Antonym> antonymList = graph.getAll(hg.and(hg.type(Antonym.class),
// hg.incident(graph.getHandle(senseWithAntonyms))));
// System.out.println("Adjective's meaning: " + senseWithAntonyms.getGloss());
//
// // Getting and printing antonyms
// int antonymListSize = antonymList.size();
// for (int i = 0; i < antonymListSize; i++) {
// Antonym antonym = antonymList.get(i);
// for (int k = 0; k < antonym.getArity(); k++) {
// HGHandle handle = antonym.getTargetAt(k);
// SynsetLink sen = graph.get(handle);
// if (!sen.equals(senseWithAntonyms)) {
// sen.forEach(c -> {
// Word tempWord = graph.get(c);
// if (!tempWord.equals(bigWord)) {
// System.out.println(tempWord.getLemma());
// }
// });
// }
//
// }
// }
//
//
/**
* Îòíîøåíèå Kind of. Îòîáðàæàåò ñâÿçòü áîëåå îáùåãî ñëîâà ñ áîëåå êîíêðåòíûì
* Íàïðèìåð, ñîáàêà - îâ÷àðêà è
*/
/*HGHandle bigWord = wnGraph.findWord("animal");
// Getting all senses of the word
List<SynsetLink> adjSenseList = hg.getAll(graph,hg.and(hg.type(NounSynsetLink.class),
hg.incident(bigWord)));
// Getting the only meaning that has antonyms. It is number 9 (according to tests)
SynsetLink senseWithAntonyms = adjSenseList.get(0);
// Getting the list of antonyms
List<KindOf> antonymList = graph.getAll(hg.and(hg.type(KindOf.class),
hg.incident(graph.getHandle(senseWithAntonyms))));
System.out.println("Adjective's meaning: " + senseWithAntonyms.getGloss());
// Getting and printing antonyms
int antonymListSize = antonymList.size();
for (int i = 0; i < antonymListSize; i++) {
KindOf antonym = antonymList.get(i);
for (int k = 0; k < antonym.getArity(); k++) {
HGHandle handle = antonym.getTargetAt(k);
SynsetLink sen = graph.get(handle);
if (!sen.equals(senseWithAntonyms)) {
sen.forEach(c -> {
Word tempWord = graph.get(c);
if (!tempWord.equals(bigWord)) {
System.out.println(tempWord.getLemma());
}
});
}
}
}
*/
// HGHandle bigWord = wnGraph.findWord("chair");
// // Getting all senses of the word
// List<SynsetLink> adjSenseList = hg.getAll(graph,hg.and(hg.type(NounSynsetLink.class),
// hg.incident(bigWord)));
// // Getting the only meaning that has antonyms. It is number 9 (according to tests)
// SynsetLink senseWithAntonyms = adjSenseList.get(3);
// // Getting the list of antonyms
// List<PartOf> antonymList = graph.getAll(hg.and(hg.type(PartOf.class),
// hg.incident(graph.getHandle(senseWithAntonyms))));
// System.out.println("Adjective's meaning: " + senseWithAntonyms.getGloss());
//
// // Getting and printing antonyms
// int antonymListSize = antonymList.size();
// System.out.println(antonymListSize);
// for (int i = 0; i < antonymListSize; i++) {
// PartOf antonym = antonymList.get(i);
// for (int k = 0; k < antonym.getArity(); k++) {
// HGHandle handle = antonym.getTargetAt(k);
// SynsetLink sen = graph.get(handle);
// if (!sen.equals(senseWithAntonyms)) {
// sen.forEach(c -> {
// Word tempWord = graph.get(c);
// if (!tempWord.equals(bigWord)) {
// System.out.println(tempWord.getLemma());
// }
// });
// }
//
// }
// }
// Finding the word "big"
// HGHandle bigWord = wnGraph.findWord("animal");
// // Getting all senses of the word
// List<SynsetLink> adjSenseList = hg.getAll(graph,hg.and(hg.type(NounSynsetLink.class),
// hg.incident(bigWord)));
// Getting the only meaning that has antonyms. It is number 9 (according to tests)
// SynsetLink senseWithAntonyms = adjSenseList.get(0);
// // Getting the list of antonyms
// List<Isa> antonymList = graph.getAll(hg.and(hg.type(Isa.class),
// hg.incident(graph.getHandle(senseWithAntonyms))));
// System.out.println("Adjective's meaning: " + senseWithAntonyms.getGloss());
////
//
// System.out.println(antonymList.size());
//// // Getting and printing antonyms
// int antonymListSize = antonymList.size();
// for (int i = 0; i < antonymListSize; i++) {
// Isa antonym = antonymList.get(i);
// for (int k = 0; k < antonym.getArity(); k++) {
// HGHandle handle = antonym.getTargetAt(k);
// SynsetLink sen = graph.get(handle);
// if (!sen.equals(senseWithAntonyms)) {
// sen.forEach(c -> {
// Word tempWord = graph.get(c);
// if (!tempWord.equals(bigWord)) {
// System.out.println(tempWord.getLemma());
// }
// });
// }
//
// }
// }
// SynsetLink f = antonyms2.get(0);
// f.forEach(h -> {
// Word tmpWord = graph.get(h);
// System.out.println(tmpWord.getLemma());
// });
// int listSize = antonyms.size();
// for (int i = 0; i < listSize; i++) {
// SemanticLink meaning = antonyms.get(i);
// for (int j = 0; j < meaning.getArity(); j ++) {
// HGHandle h = meaning.getTargetAt(j);
// if (!graph.get(h).equals(adjSense)) {
// System.out.println(graph.get(h).toString());
// }
//
//
// }
//
//// System.out.println(graph.get(g).toString());
// }
//
enWordnetButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
graph = englishGraph;
wnGraph = englishWNGraph;
languageNum = 0;
}
});
ruWordnetButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
graph = russianGraph;
wnGraph = russianWNGraph;
languageNum = 1;
}
});
searchButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
// wordMeaningArea.clear();
wordMeaningArea.getChildren().clear();
HGHandle wordHandle = wnGraph.findWord(wordSearchField.getText());
// System.out.println(wordHandle);
if (wordHandle != null) {
Relations relation = new Relations();
NounList = wnGraph.getNounSenses(wordHandle);
VerbList = wnGraph.getVerbSenses(wordHandle);
AdjList = wnGraph.getAdjSenses(wordHandle);
AdverbList = wnGraph.getAdverbSenses(wordHandle);
wordMeaningArea.getChildren().add(NounHeader[languageNum]);
if (!NounList.isEmpty()) {
// Ãèïåðññûëêè íà ñèíîíèìû
List<Hyperlink> links = new ArrayList<Hyperlink>();
int nounListSize = NounList.size();
for (int i = 0; i < nounListSize; i++) {
HGHandle sense = NounList.get(i); // Çíà÷åíèå ñëîâà
/*Ñèíñåò êîíêðåòíîãî çíà÷åíèÿ ñëîâà
* Äàëåå ýòîò ñèíñåò èñïîëüçóåòñÿ äëÿ ïîëó÷åíèÿ âñåõ îòíîøåíèé
*/
SynsetLink wordSynset = graph.get(sense);
// Âûâîä ïðèìåðîâ
relation.addExamples(i, wordSynset, wordMeaningArea, languageNum);
// Âûâîä ñèíîíèìîâ
relation.addSynonyms(wnGraph, graph, wordSynset, wordMeaningArea, wordSearchField, searchButton, "Noun", languageNum);
/***************************************
* Äðóãèå òèïû îòíîøåíèé
* ************************************/
TextFlow relationsTextFlow = viewElements.addOtherRelationsLabel(wordMeaningArea, languageNum);
// Ãèïîíèìû
Hyperlink kindOfLink = relation.addHyponyms(graph, wordSynset, wordMeaningArea, wordSearchField, searchButton, relationsTextFlow, languageNum);
// Ìåðîíèìû
Hyperlink partOfLink = relation.addMeronyms(graph, wordSynset, wordMeaningArea, wordSearchField, searchButton, relationsTextFlow, languageNum);
Hyperlink[] relHyperlinks = {kindOfLink, partOfLink};
// Äîáàâëåíèå ãèïåðññûëîê íà îòíîøåíèÿ(ãèïîíèìèè, ìåðîíèìèè) â îáùåå îêíî.
viewElements.addOtherRelationsHyperlinks(wordMeaningArea, relHyperlinks, relationsTextFlow);
}
}
else {
wordMeaningArea.getChildren().add(new Text(notFoundLabel[languageNum]));
}
/*************************************
* Ãëàãîëû
* ***********************************/
wordMeaningArea.getChildren().add(VerbHeader[languageNum]);
if (!VerbList.isEmpty()) {
int verbListSize = VerbList.size();
for (int i = 0; i < verbListSize; i++) {
HGHandle sense = VerbList.get(i);
SynsetLink verbSynset = graph.get(sense);
// Âûâîä ïðèìåðîâ
relation.addExamples(i, verbSynset, wordMeaningArea, languageNum);
// Âûâîä ñèíîíèìîâ
relation.addSynonyms(wnGraph, graph, verbSynset, wordMeaningArea, wordSearchField, searchButton, "Verb", languageNum);
}
}
else {
wordMeaningArea.getChildren().add(new Text(notFoundLabel[languageNum]));
}
/****************************************
* Ïðèëàãàòåëüíûå
****************************************/
wordMeaningArea.getChildren().add(AdjHeader[languageNum]);
if (!AdjList.isEmpty()) {
int adjListSize = AdjList.size();
for (int i = 0; i < adjListSize; i++) {
HGHandle sense = AdjList.get(i);
SynsetLink adjSynset = graph.get(sense);
// Âûâîä ïðèìåðîâ
relation.addExamples(i, adjSynset, wordMeaningArea, languageNum);
// Âûâîä ñèíîíèìîâ
relation.addSynonyms(wnGraph, graph, adjSynset, wordMeaningArea, wordSearchField, searchButton, "Adjective", languageNum);
}
}
else {
wordMeaningArea.getChildren().add(new Text(notFoundLabel[languageNum]));
}
//
wordMeaningArea.getChildren().add(AdverbHeader[languageNum]);
if (!AdverbList.isEmpty()) {
int advbListSize = AdverbList.size();
for (int i = 0; i < advbListSize; i++) {
HGHandle sense = AdverbList.get(i);
SynsetLink advbSynset = graph.get(sense);
// Âûâîä ïðèìåðîâ
relation.addExamples(i, advbSynset, wordMeaningArea, languageNum);
// Âûâîä ñèíîíèìîâ
relation.addSynonyms(wnGraph, graph, advbSynset, wordMeaningArea, wordSearchField, searchButton, "Adverb", languageNum);
}
}
else {
wordMeaningArea.getChildren().add(new Text(notFoundLabel[languageNum]));
}
}
}
});
wordSearchField.setOnKeyPressed(new EventHandler<KeyEvent>() {
public void handle(KeyEvent ke) {
if (ke.getCode() == KeyCode.ENTER) {
searchButton.fire();
}
}
});
Group root = new Group();
HBox searchHBox = new HBox();
HBox meaningHBox = new HBox();
VBox vbox = new VBox();
ScrollPane scrollPane = new ScrollPane();
scrollPane.setPrefSize(450, 428);
scrollPane.setContent(wordMeaningArea);
searchHBox.getChildren().add(wordSearchField);
searchHBox.getChildren().add(searchButton);
searchHBox.getChildren().add(cb);
// searchHBox.getChildren().add(enWordnetButton);
// searchHBox.getChildren().add(ruWordnetButton);
meaningHBox.getChildren().add(scrollPane);
vbox.getChildren().add(searchHBox);
vbox.getChildren().add(meaningHBox);
root.getChildren().add(vbox);
primaryStage.setScene(new Scene(root, 445, 450));
primaryStage.setResizable(false);
primaryStage.show();
}
public static void main(String[] args) {
// loadWordnet(args);
try
{
// Çàãðóçêà ãèïåãðàôà
// graphArray[0] = HGEnvironment.get(args[1]); // EnWordnet
// graphArray[1] = HGEnvironment.get(args[2]); // RuWordnet
englishGraph = new HyperGraph(args[1]);
russianGraph = new HyperGraph(args[2]);
graph = englishGraph;
// graphArray[0] = new HyperGraph(args[1]);
// graphArray[1] = new HyperGraph(args[2]);
// graphArray[0].add(new SynsetLink())
// Ïîëó÷åíèå wordnetGraph
englishWNGraph = new WNGraph(englishGraph);
russianWNGraph = new WNGraph(russianGraph);
wnGraph = englishWNGraph;
// HGHandle perfect = wnGraphArray[0].findWord("perfect");
// HGHandle little = wnGraphArray[0].findWord("little");
// List<HGHandle> perfList = wnGraphArray[0].getNounSenses(perfect);
// List<HGHandle> littleList = wnGraphArray[0].getNounSenses(little);
// HGHandle perfSense = perfList.get(0);
// HGHandle littleSense = littleList.get(0);
//
// HGHandle[] targ = new HGHandle[2];
// HGHandle[] targ2 = new HGHandle[2];
// targ2[0] = perfect;
// targ2[1] = little;
// targ[0] = perfSense;
// targ[1] = littleSense;
// SynsetLink synL = graphArray[0].get(perfSense);
// HGHandle[] targets = synL.getTargets();
// int ll = targets.length + 1;
// HGHandle[] targets2 = new HGHandle[ll];
// for (int k = 0; k < ll; k++) {
// targets2[k] = targets[k];
// }
// targets2[ll-1] = littleSense;
//
// synL.setTargets(targets2);
// graphArray[0].update(synL);
// SynsetLink synLink = new NounSynsetLink();
// synLink.setTargets(targ2);
// SemanticLink link = new KindOf();
// link.setTargets(targ);////
// graphArray[0].add(synLink);
// graphArray[0].add(link);
// wnGraphArray[0] = new WNGraph(graphArray[0]);
////
launch(args);
}
catch (Throwable t)
{
t.printStackTrace();
}
}
public static void loadWordnet(String args[]) {
HGWordNetLoader loader = new HGWordNetLoader();
loader.setDictionaryLocation(args[0]);
try
{
HGConfiguration config = new HGConfiguration();
// BDBConfig bdbConfig = (BDBConfig)config.getStoreImplementation().getConfiguration();
// Change the storage cache from the 20MB default to 500MB
// bdbConfig.getEnvironmentConfig().setCacheSize(1000*1024*1024);
config.setTransactional(false);
HyperGraph graph = HGEnvironment.get(args[1]);
System.out.println("Loading WordNet to " + args[1] + " from dictionary " + args[0]);
System.out.println("Atom count before : " + hg.count(graph, hg.all()));
long startTime = System.currentTimeMillis();
loader.loadWordNet(graph);
long endTime = System.currentTimeMillis();
System.out.println("WordNet sucessfully loaded - " + (endTime - startTime)/1000/60 + " minutes.");
System.out.println("Atom count after : " + hg.count(graph, hg.all()));
}
catch (Throwable t)
{
t.printStackTrace();
}
}
public String firstUpperCase(String word){
if(word == null || word.isEmpty()) return "";//èëè return word;
return word.substring(0, 1).toUpperCase() + word.substring(1);
}
public static class extText extends Text implements Cloneable{
@Override
public extText clone() throws CloneNotSupportedException{
extText obj = (extText)super.clone();
return obj;
}
public extText(String text) {
super(text);
}
}
}