Complex sentence: Government and (more usually) private academies were established during the Tang dynasty but had begun to decline by the 12th century.
Split into simpler sentences: Government and (more usually) private academies were established during the Tang dynasty. However, the academies had begun to decline by the 12th century.