File size: 1,972 Bytes
3f209a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337d881
 
 
 
 
 
 
 
 
 
 
3f209a4
 
 
 
 
337d881
3f209a4
7245f26
 
 
 
 
 
 
 
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
// Hugging Face Dataset Server API Types

export interface DatasetRow {
  [key: string]: any;
}

export interface DatasetFeature {
  _type: string;
  [key: string]: any;
}

export interface DatasetFeatures {
  [key: string]: DatasetFeature;
}

export interface DatasetRowsResponse {
  features: DatasetFeature[];
  rows: {
    row_idx: number;
    row: DatasetRow;
    truncated_cells: string[];
  }[];
  num_rows_total: number;
  num_rows_per_page: number;
  partial: boolean;
}

export interface DatasetFirstRowsResponse {
  features: DatasetFeature[];
  rows: {
    row_idx: number;
    row: DatasetRow;
    truncated_cells: string[];
  }[];
  truncated: boolean;
}

export interface DatasetSplit {
  dataset: string;
  config: string;
  split: string;
}

export interface DatasetSplitsResponse {
  splits: DatasetSplit[];
  pending: any[];
  failed: any[];
  partial: boolean;
}

export interface DatasetError {
  error: string;
  message?: string;
}

export interface DatasetConfig {
  dataset: string;
  token?: string;
  config?: string;
  split?: string;
}

export interface TermDefinition {
  term: string;
  definition: string;
}

export interface JurisdictionData {
  jurisdiction: string;
  terms: TermDefinition[];
}

export interface ComparisonState {
  jurisdiction1: string;
  jurisdiction2: string;
  data1: TermDefinition[];
  data2: TermDefinition[];
  selectedTerm1: string | null;
  selectedTerm2: string | null;
}

export interface Comparison {
  term_j1: string;
  term_j2: string;
  category: string;
  subcategory: string;
  similarity_score: number;
  reasoning: string;
  weight: number;
  weighted_similarity_score: number;
}

export interface EquivalencyScore {
  term_j1: string;
  term_j2: string;
  aggregated_similarity_score: number;
  comparative_law_note: string;
  comparisons?: Comparison[];
}

export interface GradingTemplateEntry {
  term: string;
  category: string;
  subcategory: string;
  question: string;
  answer: string;
}