Révision 1132
tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 1132) | ||
---|---|---|
638 | 638 |
this.pProperty = property; |
639 | 639 |
} |
640 | 640 |
|
641 |
|
|
642 |
/** |
|
643 |
* Gets a Lexicon from the specified corpus. |
|
644 |
* If a Lexicon child exists in the Corpus fro the specified property, returns it otherwise creates and computes a new Lexicon. |
|
645 |
* @param corpus |
|
646 |
* @param property |
|
647 |
* @return |
|
648 |
* @throws Exception |
|
649 |
*/ |
|
650 |
public static Lexicon getLexicon(CQPCorpus corpus, Property property, IProgressMonitor monitor) throws Exception { |
|
641 |
|
|
642 |
public static Lexicon getLexicon(CQPCorpus corpus, Property property, IProgressMonitor monitor, boolean visible) throws Exception { |
|
651 | 643 |
Lexicon lexicon = null; |
652 | 644 |
|
653 | 645 |
// recycling parent Lexicon if exists |
... | ... | |
666 | 658 |
} |
667 | 659 |
|
668 | 660 |
if(!lexicon.hasBeenComputedOnce()) { |
661 |
lexicon.setVisible(visible); |
|
669 | 662 |
lexicon.compute(monitor); |
670 | 663 |
} |
671 | 664 |
|
672 | 665 |
return lexicon; |
673 | 666 |
} |
674 | 667 |
|
668 |
|
|
669 |
/** |
|
670 |
* Gets a Lexicon from the specified corpus. |
|
671 |
* If a Lexicon child exists in the Corpus fro the specified property, returns it otherwise creates and computes a new Lexicon. |
|
672 |
* @param corpus |
|
673 |
* @param property |
|
674 |
* @return |
|
675 |
* @throws Exception |
|
676 |
*/ |
|
677 |
public static Lexicon getLexicon(CQPCorpus corpus, Property property, IProgressMonitor monitor) throws Exception { |
|
678 |
return getLexicon(corpus, property, monitor, true); |
|
679 |
} |
|
675 | 680 |
|
681 |
|
|
676 | 682 |
// /** |
677 | 683 |
// * Find or build a lexicon given a Corpus (MainCorpus or SubCorpus). |
678 | 684 |
// * |
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 1132) | ||
---|---|---|
201 | 201 |
// parts lexicons |
202 | 202 |
List<Lexicon> partsLexicons = new ArrayList<Lexicon>(); |
203 | 203 |
for (int i = 0; i < partition.getNPart(); i++) { |
204 |
Lexicon l = Lexicon.getLexicon(partition.getParts().get(i), this.property, this.monitor); |
|
205 |
l.setVisible(false); |
|
206 |
partsLexicons.add(l); |
|
204 |
partsLexicons.add(Lexicon.getLexicon(partition.getParts().get(i), this.property, this.monitor, false)); |
|
207 | 205 |
} |
208 | 206 |
|
209 | 207 |
// Corpus global lexicon |
210 |
Lexicon corpusLexicon = Lexicon.getLexicon(partition.getParent(), this.property, this.monitor); |
|
211 |
corpusLexicon.setVisible(false); |
|
208 |
Lexicon corpusLexicon = Lexicon.getLexicon(partition.getParent(), this.property, this.monitor, false); |
|
212 | 209 |
|
213 | 210 |
ArrayList<String> filteredForms = new ArrayList<String>(); |
214 | 211 |
//create a copy and filter line with Fmin; |
Formats disponibles : Unified diff