Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
all kinds of baseline models for long text classificaiton( text categorization)
| Date | Stars |
|---|---|
| 2026-07-30 | 292 |
| 2026-08-07 | 293 |
| 2026-09-16 | 293 |
| 2026-09-28 | 294 |
| 2026-10-18 | 293 |
| 2026-10-19 | 294 |
| 2026-11-02 | 295 |
| 2026-11-04 | 295 |
Today
— stars today
This week
+1 stars this week
This month
+1 stars this month
Momentum
0.0
growth rate 0.34%/day
AI_LAW
-------------------------------------------------------------------------
all kinds of baseline models for long text classificaiton( text categorization)
Update: Joint Model for law cases prediction is released.
run python HAN_train.py to train the model for predict accusation, relevant articles and term of imprisonment.
challenges of this task:
1) the description of law case(called facts) is quite long, the average words is around 400. it is not only long, but contain lots of information,
even for a human being, you need to pay lots of attention before you can tell what's it about. for machine it need to have ability to handle long distance dependency,
and pay attention on most important information.
2) multiple sub tasks are included in this task. you are not only to predict accusations, but also need to predict relevant articles and term of imprisonment.
3) this is a multi-label classification problem. given a fact, it may exists one or more than one accusations and serveral relevant articles.
4) this also a imbalanced classification problem, while some labels have many data, other labels only have few data. to get best performance, you are not only
to balanced precision and recall for a single label, but also need to balanced importance among different labels based on requirement or your evaluation matrix.
if you have any suggestion or problem, a better idea on how to slove this problem,find a bug, or want to find a team member, you are welcomed to can contact with me:
[email protected]. you can also commit your code to this repository.
1.Desc
-------------------------------------------------------------------------
this repository contain models that learn from law cases to make a prediction:
crime(accusation): which kinds of crime the bad guy did according to law system
relevant articles: specific law that is used for this case
term of imprisonment: whether it is death penalty or life imprisonment, how many years in prison(imprisonment)
find more about task, data or even start smart AI competition by check here:
<a href='http://cail.cipsc.org.cn/index.html'>http://cail.cipsc.org.cn/index.html</a>
you can download sample data <a href='https://pan.baidu.com/s/1oXL3Qa5HSPagG-NxFaNvHA'>here</a>, password is:d6e9
2.Data Processing: Data Distribution,Pre-processing, Generate Training & Validation set, Data Mining Features
-------------------------------------------------------------------------
##2.1 Data Distribution
1) total examples, crime,relevant articles(stage one):
data_train: 155k
data_valid(data_valid.json): 17k
data_test(data_test.json): 33k
number of total [accusation]: 202
number of total [relevant_article]:183
total examples, crime,relevant articles(stage two):
data set(cail2018_big.json): around 1.7 million, we had to generate training/validation/test set ourself.
number of labels is same as stage one.
2) length of inputs(facts of the law case, after word tokenize)
average length: 279
max length: 9
mini length: 19447
length percentage:[(50, 0.01), (75, 0.04), (100, 0.07), (150, 0.19), (200, 0.19), (300, 0.25), (400, 0.11), (500, 0.05), (600, 0.03), (700, 0.06)]
as we can see the majority of length is between 100 and 500. percentage of length less than 400 is 87%, less then 500 is 0.92.
notice: here (50, 0.01) means length less than 50 is 1%, (75, 0.04) means length greater than 50 and less than 75 is 4%.
that's take length as 500. pad for length less it, and truncate words exceed this number(truncate from start words, not end).
3) label distribution(accusation, relevant article):
how many accusations for a case?
average length:1.2; max_length:6;mini_length:1; around 78% cases only has one accusation. most cases's accusation is less and equal than 3.
length of accusation distribution:[(1, Excerpt of 28,820 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:922f798e25a544ad, topic:text-classification