Package it.uniroma1.lcl.babelnet
Class BabelSense.Builder
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.BabelSense.Builder
-
- Enclosing class:
- BabelSense
public static class BabelSense.Builder extends Object
The Builder of aBabelSense
.- Author:
- navigli
-
-
Constructor Summary
Constructors Constructor Description Builder(String lemma, String simpleLemma, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource source, String sensekey, BabelSynset synset)
Builder constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BabelSense
build()
Builds theBabelSense
BabelSense.Builder
keySense()
Sets the feature of being a key sense (false if not called)BabelSense.Builder
keySense(boolean bKeySense)
Sets the feature of being or not a key sense (false if not called)BabelSense.Builder
phonetics(BabelSensePhonetics pronunciations)
Sets the phonetic informationBabelSense.Builder
tag(Tag... tags)
Sets the sense tags from given tags.BabelSense.Builder
tag(Collection<? extends Tag> tags)
Sets the sense tags from a given collection of tags.BabelSense.Builder
translationInfo(String translationInfo)
Deprecated.To be removed in the next API releaseBabelSense.Builder
wordNetOffset(String wordNetOffset)
Sets the WordNet offset for the (WordNet) senseBabelSense.Builder
wordNetSenseNumber(Integer wordNetSenseNumber)
Sets the WordNet sense number for the (WordNet) senseBabelSense.Builder
wordNetSynsetPosition(Integer wordNetSynsetPosition)
Sets the WordNet synset position for the (WordNet) senseBabelSense.Builder
YAGOURL(String YAGOURL)
Sets the YAGO URL
-
-
-
Constructor Detail
-
Builder
public Builder(String lemma, String simpleLemma, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource source, String sensekey, BabelSynset synset)
Builder constructor- Parameters:
lemma
- the sense lemmalanguage
- the sense languagepos
- the sense part of speechsource
- the sense sourcesensekey
- the sense keysynset
- the synset the sense belongs to
-
-
Method Detail
-
keySense
public BabelSense.Builder keySense(boolean bKeySense)
Sets the feature of being or not a key sense (false if not called)- Parameters:
bKeySense
- true if the sense is key, false otherwise- Returns:
- the
BabelSense.Builder
-
keySense
public BabelSense.Builder keySense()
Sets the feature of being a key sense (false if not called)- Returns:
- the
BabelSense.Builder
-
wordNetOffset
public BabelSense.Builder wordNetOffset(String wordNetOffset)
Sets the WordNet offset for the (WordNet) sense- Parameters:
wordNetOffset
- the WordNet offset position for the (WordNet) sense- Returns:
- the
BabelSense.Builder
-
wordNetSynsetPosition
public BabelSense.Builder wordNetSynsetPosition(Integer wordNetSynsetPosition)
Sets the WordNet synset position for the (WordNet) sense- Parameters:
wordNetSynsetPosition
- the WordNet synset position for the (WordNet) sense- Returns:
- the
BabelSense.Builder
-
wordNetSenseNumber
public BabelSense.Builder wordNetSenseNumber(Integer wordNetSenseNumber)
Sets the WordNet sense number for the (WordNet) sense- Parameters:
wordNetSenseNumber
- the WordNet sense number for the (WordNet) sense- Returns:
- the
BabelSense.Builder
-
translationInfo
@Deprecated public BabelSense.Builder translationInfo(String translationInfo)
Deprecated.To be removed in the next API releaseSets the translation information- Parameters:
translationInfo
- the translation information for the sense- Returns:
- the
BabelSense.Builder
-
YAGOURL
public BabelSense.Builder YAGOURL(String YAGOURL)
Sets the YAGO URL- Parameters:
YAGOURL
- the YAGO URL for the sense- Returns:
- the
BabelSense.Builder
-
phonetics
public BabelSense.Builder phonetics(BabelSensePhonetics pronunciations)
Sets the phonetic information- Parameters:
pronunciations
- phonetic information- Returns:
- the
BabelSense.Builder
-
tag
public BabelSense.Builder tag(Collection<? extends Tag> tags)
Sets the sense tags from a given collection of tags.- Parameters:
tags
- tags for this sense- Returns:
- the
BabelSense.Builder
-
tag
public BabelSense.Builder tag(Tag... tags)
Sets the sense tags from given tags.- Parameters:
tags
- tags for this sense- Returns:
- the
BabelSense.Builder
-
build
public BabelSense build()
Builds theBabelSense
- Returns:
- the resulting
BabelSense
-
-