HHansi commited on
Commit
5812828
·
verified ·
1 Parent(s): b0fc26f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md CHANGED
@@ -1,3 +1,53 @@
1
  ---
2
  license: apache-2.0
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
  ---
6
+
7
+ # ACCORD-NLP
8
+
9
+ ACCORD-NLP is a Natural Language Processing (NLP) framework developed by the [ACCORD](https://accordproject.eu/) project to facilitate Automated Compliance Checking (ACC) within the Architecture, Engineering, and Construction (AEC) sector.
10
+ It consists of several pre-trained/fine-tuned machine learning models to perform the following information extraction tasks from regulatory text.
11
+ 1. Entity Extraction/Classification (ner)
12
+ 2. Relation Extraction/Classification (re)
13
+
14
+ **roberta-large-lm** is a domain-specific RoBERTa large model or a RoBERTa large model pre-trained on a building regulatory text corpus using the Masked Language Modelling (MLM) objective.
15
+ This needs to be fine-tuned for a downstream task such as entity or relation classification.
16
+
17
+ ## Installation
18
+
19
+ ### From Source
20
+ ```
21
+ git clone https://github.com/Accord-Project/accord-nlp.git
22
+ cd accord-nlp
23
+ pip install -r requirements.txt
24
+ ```
25
+
26
+ ### From pip
27
+ ```
28
+ pip install accord-nlp
29
+ ```
30
+
31
+ ## Using Pre-trained Models
32
+
33
+ ### Entity Extraction/Classification (ner)
34
+
35
+ ```python
36
+ from accord_nlp.text_classification.ner.ner_model import NERModel
37
+
38
+ model = NERModel('roberta', 'ACCORD-NLP/ner-roberta-large')
39
+ predictions, raw_outputs = model.predict(['The gradient of the passageway should not exceed five per cent.'])
40
+ print(predictions)
41
+ ```
42
+
43
+ ### Relation Extraction/Classification (re)
44
+
45
+ ```python
46
+ from accord_nlp.text_classification.relation_extraction.re_model import REModel
47
+
48
+ model = REModel('roberta', 'ACCORD-NLP/re-roberta-large')
49
+ predictions, raw_outputs = model.predict(['The <e1>gradient<\e1> of the passageway should not exceed <e2>five per cent</e2>.'])
50
+ print(predictions)
51
+ ```
52
+
53
+ For more details, please refer to the [ACCORD-NLP](https://github.com/Accord-Project/accord-nlp) GitHub repository.