question: By what year had Portugal established itself as an independent kingdom ?
answer: 1139
turker_answer: By 1139 , Portugal established itself as an independent kingdom .
rule-based: Portugal had established itself as an independent kingdom by 1139 .