Skip to content

Commit

Permalink
Merge pull request #105 from tychy/parse-daihyo-sikko
Browse files Browse the repository at this point in the history
代表執行役をパース
  • Loading branch information
tychy authored Jul 9, 2024
2 parents 250c846 + 0b1981f commit e3fbdbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion toukibo/houjin_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ func (h *HoujinBody) GetHoujinRepresentatives() ([]HoujinExecutiveValue, error)

for _, e := range h.HoujinExecutive {
for _, v := range e {
if (v.Position == "代表取締役" || v.Position == "代表理事" || v.Position == "代表社員" || v.Position == "会長" || v.Position == "代表役員" || v.Position == "代表者" || v.Position == "理事長" || v.Position == "会頭" || v.Position == "学長") && v.IsValid {
if (v.Position == "代表取締役" || v.Position == "代表理事" || v.Position == "代表社員" || v.Position == "会長" ||
v.Position == "代表役員" || v.Position == "代表者" || v.Position == "理事長" || v.Position == "会頭" ||
v.Position == "学長" || v.Position == "代表執行役") && v.IsValid {
res = append(res, v)
}
}
Expand Down
4 changes: 3 additions & 1 deletion toukibo/parse_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ func getShain(s string) (string, string, string) {
}

func getExecutiveNameAndPosition(s string) (string, string, string) {
positions := "代表取締役|取締役・監査等|取締役|監査役|会計監査人|代表理事|理事長|理事|監事|代表社員|業務執行社員|会長|代表清算人|清算人|代表役員|会計参与|無限責任社員|有限責任社員|破産管財人|評議員|代表者|会頭|学長"
positions := "代表取締役|取締役・監査等|取締役|監査役|会計監査人|代表理事|理事長|理事|監事|代表社員|" +
"業務執行社員|会長|代表清算人|清算人|代表役員|会計参与|無限責任社員|有限責任社員|破産管財人|評議員|代表者|" +
"会頭|学長|代表執行役|執行役|報酬委員|監査委員|指名委員"
pattern := fmt.Sprintf("(%s) *([%s]+)", positions, ZenkakuStringPattern)
regex := regexp.MustCompile(pattern)
matches := regex.FindStringSubmatch(s)
Expand Down

0 comments on commit e3fbdbf

Please sign in to comment.