Skip to content

Commit a4addf7

Browse files
authored
Merge pull request #59 from kurusugawa-computer/fix/readme
update README.md
2 parents bf96159 + 65df949 commit a4addf7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ service = build_from_netrc()
8282
## `service.api`のサンプルコード
8383

8484
* `service.api`には、Web APIに対応するメソッドが定義されています。
85-
* メソッド名は、[AnnoFab Web APIのOpenAPI specification](https://annofab.com/docs/api/swagger.yaml)に記載されている`operationId`をスネークケースに変換したものです
85+
* メソッド名は、[AnnoFab Web APIのOpenAPI specification](https://annofab.com/docs/api/swagger.yaml)に記載されている`operationId`を、スネークケースに変換したものです
8686
* 各メソッドの戻り値の型は`Tupple[Content, Response]`です。
8787
Responseは[requestsモジュールのReponseオブジェクト](https://2.python-requests.org/en/master/api/#requests.Response)です。
8888
ContentはReponseの中身です。
@@ -101,7 +101,7 @@ url = response.headers['Location']
101101

102102
## `service.wrapper`のサンプルコード
103103

104-
`service.wrapper`は、APIを組み合わせたメソッドが定義されています
104+
`service.wrapper`には、`server.api`を組み合わせたメソッドが定義されています
105105

106106

107107
```python
@@ -126,36 +126,36 @@ service.wrapper.copy_project_members(src_project_id, dest_project_id)
126126
service.wrapper.copy_annotation_specs(src_project_id, dest_project_id)
127127
```
128128

129-
## アノテーションzipのパース
130-
ダウンロードしたアノテーションzipをJSONファイルごとにパース(遅延読み込み)します
131-
zipファイルを展開したディレクトリもパースが可能です
129+
## アノテーションzipの読み込み
130+
ダウンロードしたアノテーションzipを、JSONファイルごとに読み込みます
131+
zipファイルを展開したディレクトリも読み込み可能です
132132

133133
```python
134134
import zipfile
135135
from pathlib import Path
136136
from annofabapi.parser import lazy_parse_simple_annotation_dir, lazy_parse_simple_annotation_zip, SimpleAnnotationZipParser, SimpleAnnotationDirParser
137137

138138

139-
# Simpleアノテーションzipのパース
139+
# Simpleアノテーションzipの読み込み
140140
iter_parser = lazy_parse_simple_annotation_zip(Path("simple-annotation.zip"))
141141
for parser in iter_parser:
142142
simple_annotation = parser.parse()
143143
print(simple_annotation)
144144

145-
# Simpleアノテーションzipを展開したディレクトリのパース
145+
# Simpleアノテーションzipを展開したディレクトリの読み込み
146146
iter_parser = lazy_parse_simple_annotation_dir(Path("simple-annotation-dir"))
147147
for parser in iter_parser:
148148
simple_annotation = parser.parse()
149149
print(simple_annotation)
150150

151151

152-
# Simpleアノテーションzip内の1個のJSONファイルをパース
152+
# Simpleアノテーションzip内の1個のJSONファイルを読み込み
153153
with zipfile.ZipFile('simple-annotation.zip', 'r') as zip_file:
154154
parser = SimpleAnnotationZipParser(zip_file, "task_id/input_data_name.json")
155155
simple_annotation = parser.parse()
156156
print(simple_annotation)
157157

158-
# Simpleアノテーションzip内を展開したディレクトリ内の1個のJSONファイルをパース
158+
# Simpleアノテーションzip内を展開したディレクトリ内の1個のJSONファイルを読み込み
159159
parser = SimpleAnnotationDirParser(Path("task_id/input_data_name.json"))
160160
simple_annotation = p.parse()
161161
print(simple_annotation)

0 commit comments

Comments
 (0)