Cabin is related to Ship. you are likely to find Head in/at/on Ship. Ear is part of Head. 
Law is related to Written. 
Cabin <--RelatedTo--> Ship <--AtLocation-- Head <--PartOf-- Ear 
Law <--RelatedTo--> Written 