-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add C_MTEB * add C_MTEB * rename MMarcoReranking * rename MMarcoReranking * Update mteb/tasks/Retrieval/CMTEBRetrieval.py * Update README.md * Allow custom encode functions --------- Co-authored-by: shitao <stxiao@bupt.edu.cn> Co-authored-by: Nouamane Tazi <nouamane98@gmail.com> Co-authored-by: Niklas Muennighoff <n.muennighoff@gmail.com>
- Loading branch information
1 parent
2779344
commit 071974a
Showing
16 changed files
with
652 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
from ...abstasks import AbsTaskClassification | ||
|
||
class TNews(AbsTaskClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'TNews', | ||
'hf_hub_name': 'C-MTEB/TNews-classification', | ||
'description': 'Short Text Classification for News', | ||
"reference": "https://www.cluebenchmarks.com/introduce.html", | ||
'type': 'Classification', | ||
'category': 's2s', | ||
'eval_splits': ['validation'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'accuracy', | ||
'samples_per_label': 32, | ||
} | ||
|
||
|
||
class IFlyTek(AbsTaskClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'IFlyTek', | ||
'hf_hub_name': 'C-MTEB/IFlyTek-classification', | ||
'description': 'Long Text classification for the description of Apps', | ||
"reference": "https://www.cluebenchmarks.com/introduce.html", | ||
'type': 'Classification', | ||
'category': 's2s', | ||
'eval_splits': ['validation'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'accuracy', | ||
'samples_per_label': 32, | ||
'n_experiments': 5 | ||
} | ||
|
||
|
||
class MultilingualSentiment(AbsTaskClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'MultilingualSentiment', | ||
'hf_hub_name': 'C-MTEB/MultilingualSentiment-classification', | ||
'description': 'A collection of multilingual sentiments datasets grouped into 3 classes -- positive, neutral, negative', | ||
"reference": "https://github.com/tyqiangz/multilingual-sentiment-datasets", | ||
'category': 's2s', | ||
'type': 'Classification', | ||
'eval_splits': ['validation'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'accuracy', | ||
'samples_per_label': 32, | ||
} | ||
|
||
|
||
|
||
class JDReview(AbsTaskClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'JDReview', | ||
'hf_hub_name': 'C-MTEB/JDReview-classification', | ||
'description': 'review for iphone', | ||
'category': 's2s', | ||
'type': 'Classification', | ||
'eval_splits': ['test'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'accuracy', | ||
'samples_per_label': 32, | ||
} | ||
|
||
|
||
class OnlineShopping(AbsTaskClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'OnlineShopping', | ||
'hf_hub_name': 'C-MTEB/OnlineShopping-classification', | ||
'description': 'Sentiment Analysis of User Reviews on Online Shopping Websites', | ||
'category': 's2s', | ||
'type': 'Classification', | ||
'eval_splits': ['test'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'accuracy', | ||
'samples_per_label': 32, | ||
} | ||
|
||
|
||
class Waimai(AbsTaskClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'Waimai', | ||
'hf_hub_name': 'C-MTEB/waimai-classification', | ||
'description': 'Sentiment Analysis of user reviews on takeaway platforms', | ||
'category': 's2s', | ||
'type': 'Classification', | ||
'eval_splits': ['test'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'accuracy', | ||
'samples_per_label': 32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
from ...abstasks.AbsTaskClustering import AbsTaskClustering | ||
|
||
|
||
class CLSClusteringS2S(AbsTaskClustering): | ||
@property | ||
def description(self): | ||
return { | ||
"name": "CLSClusteringS2S", | ||
"hf_hub_name": "C-MTEB/CLSClusteringS2S", | ||
"description": ( | ||
"Clustering of titles from CLS dataset. Clustering of 13 sets, based on the main category." | ||
), | ||
"reference": "https://arxiv.org/abs/2209.05034", | ||
"type": "Clustering", | ||
"category": "s2s", | ||
"eval_splits": ["test"], | ||
"eval_langs": ["zh"], | ||
"main_score": "v_measure", | ||
} | ||
|
||
|
||
|
||
class CLSClusteringP2P(AbsTaskClustering): | ||
@property | ||
def description(self): | ||
return { | ||
"name": "CLSClusteringP2P", | ||
"hf_hub_name": "C-MTEB/CLSClusteringP2P", | ||
"description": ( | ||
"Clustering of titles + abstract from CLS dataset. Clustering of 13 sets, based on the main category." | ||
), | ||
"reference": "https://arxiv.org/abs/2209.05034", | ||
"type": "Clustering", | ||
"category": "p2p", | ||
"eval_splits": ["test"], | ||
"eval_langs": ["zh"], | ||
"main_score": "v_measure", | ||
} | ||
|
||
|
||
|
||
class ThuNewsClusteringS2S(AbsTaskClustering): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'ThuNewsClusteringS2S', | ||
'hf_hub_name': 'C-MTEB/ThuNewsClusteringS2S', | ||
'description': 'Clustering of titles from the THUCNews dataset', | ||
"reference": "http://thuctc.thunlp.org/", | ||
"type": "Clustering", | ||
"category": "s2s", | ||
"eval_splits": ["test"], | ||
"eval_langs": ["zh"], | ||
"main_score": "v_measure", | ||
} | ||
|
||
|
||
class ThuNewsClusteringP2P(AbsTaskClustering): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'ThuNewsClusteringP2P', | ||
'hf_hub_name': 'C-MTEB/ThuNewsClusteringP2P', | ||
'description': 'Clustering of titles + abstracts from the THUCNews dataset', | ||
"reference": "http://thuctc.thunlp.org/", | ||
"type": "Clustering", | ||
"category": "p2p", | ||
"eval_splits": ["test"], | ||
"eval_langs": ["zh"], | ||
"main_score": "v_measure", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from ...abstasks.AbsTaskPairClassification import AbsTaskPairClassification | ||
|
||
|
||
class Ocnli(AbsTaskPairClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'Ocnli', | ||
"hf_hub_name": "C-MTEB/OCNLI", | ||
'description': 'Original Chinese Natural Language Inference dataset', | ||
"reference": "https://arxiv.org/abs/2010.05444", | ||
'category': 's2s', | ||
'type': 'PairClassification', | ||
'eval_splits': ['validation'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'ap', | ||
} | ||
|
||
|
||
class Cmnli(AbsTaskPairClassification): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'Cmnli', | ||
"hf_hub_name": "C-MTEB/CMNLI", | ||
'description': 'Chinese Multi-Genre NLI', | ||
"reference": "https://huggingface.co/datasets/clue/viewer/cmnli", | ||
'category': 's2s', | ||
'type': 'PairClassification', | ||
'eval_splits': ['validation'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'ap', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .SprintDuplicateQuestionsPC import * | ||
from .TwitterSemEval2015PC import * | ||
from .TwitterURLCorpusPC import * | ||
from .CMTEBPairClassification import * | ||
from .PolishPC import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from ...abstasks.AbsTaskReranking import AbsTaskReranking | ||
|
||
|
||
class T2Reranking(AbsTaskReranking): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'T2Reranking', | ||
'hf_hub_name': "C-MTEB/T2Reranking", | ||
'description': 'T2Ranking: A large-scale Chinese Benchmark for Passage Ranking', | ||
"reference": "https://arxiv.org/abs/2304.03679", | ||
'type': 'Reranking', | ||
'category': 's2p', | ||
'eval_splits': ['dev'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'map', | ||
} | ||
|
||
|
||
class MMarcoReranking(AbsTaskReranking): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'MMarcoReranking', | ||
'hf_hub_name': "C-MTEB/Mmarco-reranking", | ||
'description': 'mMARCO is a multilingual version of the MS MARCO passage ranking dataset', | ||
"reference": "https://github.com/unicamp-dl/mMARCO", | ||
'type': 'Reranking', | ||
'category': 's2p', | ||
'eval_splits': ['dev'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'map', | ||
} | ||
|
||
|
||
class CMedQAv1(AbsTaskReranking): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'CMedQAv1', | ||
"hf_hub_name": "C-MTEB/CMedQAv1-reranking", | ||
'description': 'Chinese community medical question answering', | ||
"reference": "https://github.com/zhangsheng93/cMedQA", | ||
'type': 'Reranking', | ||
'category': 's2p', | ||
'eval_splits': ['test'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'map', | ||
} | ||
|
||
|
||
class CMedQAv2(AbsTaskReranking): | ||
@property | ||
def description(self): | ||
return { | ||
'name': 'CMedQAv2', | ||
"hf_hub_name": "C-MTEB/CMedQAv2-reranking", | ||
'description': 'Chinese community medical question answering', | ||
"reference": "https://github.com/zhangsheng93/cMedQA2", | ||
'type': 'Reranking', | ||
'category': 's2p', | ||
'eval_splits': ['test'], | ||
'eval_langs': ['zh'], | ||
'main_score': 'map', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.