Skip to content

Commit

Permalink
Merge pull request #102 from tychy/issue-95
Browse files Browse the repository at this point in the history
fix issue95
  • Loading branch information
tychy authored Jun 17, 2024
2 parents e472e72 + 612fcf6 commit 2bc2e9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions toukibo/parse_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func getExecutiveNameAndPosition(s string) (string, string, string) {
name := trimAllSpace(matches[2])

// 金額の記載がある場合、役員名から削除
name = trimPattern(name, fmt.Sprintf("金[%s]+円全部履行", ZenkakuStringPattern))
name = trimPattern(name, fmt.Sprintf("金[%s]+", ZenkakuStringPattern)) // sample519用のハック
name = trimPattern(name, fmt.Sprintf("金[%s]+(?:万円|円)全部履行", ZenkakuNumberPattern))
name = trimPattern(name, fmt.Sprintf("金[%s]+(?:万円|円)", ZenkakuNumberPattern)) // sample519用のハック

// 「取締役・監査等」の場合、役職は「取締役・監査等委員」に変更
if pos == "取締役・監査等" {
Expand All @@ -140,8 +140,8 @@ func getExecutiveNameAndPosition(s string) (string, string, string) {
out, pos, name := getShain(s)
if pos != "" {
// 金額の記載がある場合、役員名から削除
name = trimPattern(name, fmt.Sprintf("金[%s]+円全部履行", ZenkakuStringPattern))
name = trimPattern(name, fmt.Sprintf("金[%s]+", ZenkakuStringPattern)) // sample519用のハック
name = trimPattern(name, fmt.Sprintf("金[%s]+(?:万円|円)全部履行", ZenkakuNumberPattern))
name = trimPattern(name, fmt.Sprintf("金[%s]+(?:万円|円)", ZenkakuNumberPattern)) // sample519用のハック

return out, pos, name
}
Expand Down
1 change: 1 addition & 0 deletions toukibo/zenkaku.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
ZenkakuColon = ':'
ZenkakuSlash = '/'
ZenkakuHyphen = '-'
ZenkakuNumberPattern = `0-9`
ZenkakuStringPattern = `\p{Han}\p{Hiragana}\p{Katakana}A-Za-z0-9A-Za-z0-9&’,‐.・ー\s 。-、:/`
)

Expand Down

0 comments on commit 2bc2e9f

Please sign in to comment.