neo-confucian period during the tang dynasty ( 618-907 ) buddhism and taoism remained the dominant philosophies initially , but confucianism alone among the three prevailing schools offered a political and social philosophy suited to the needs of a large centralized empire .