<?php
require '/lib/LanguageDetector/autoload.php';
require "/lib/TextRank/TextRank.php";
require "/lib/TextRank/config.php";
require "/lib/TextRank/DefaultEvents.php";
require "/lib/TextRank/Stopword.php";
require "/lib/TextRank/Summary.php";
require "/lib/TextRank/SummaryPageRank.php";


$text = "
    
How to Visit a Chinese Temple
Visiting a Chinese temple can be a life altering experience, and they are common tourist destinations. Temples are located all over the country from deep in the busy cities to mountain peaks. The country has many different types of religions, and there are certain rules of etiquette to adhere to when visiting these sacred sites.

Types of Temples

China is a large country and has a history of many religions and philosophies. The most common types of temples in the nation are Buddhist, Taoist, and Confucian. Most of these sacred sites also act as a place of practice and living quarters for monks and nuns.

Popular Sites

There are several popular temples in China, and most temples can be visited by men, women and children.

The South Putuo Temple is a famous Buddhist temple located in the Putuo Mountains in East China that was built in the seventh century. Another popular site is the Nanshan Buddhist Temple in Sanya, South China. This holy site has the world's tallest Guanyin Bodhisattba and is nestled between the sea and mountains. Drepung Monastery is the largest Tibetan monastery, famous for its giant Thangka unfurling at the Shoton Festival.

When to Visit

The best time to visit a religious site in China is at dawn. Temperatures will still be cool, and monks and nuns will typically be returning from their morning prayers. Most temples are open year round and from dawn to dusk.

Tickets

Temples open to visitors will likely have windows outside their compounds. There will typically be a guard at the gate. Visitors must purchase a ticket before entering a temple. This money is usually used to feed monks, nuns and other staff members and to keep the sacred site running.

Layout

Most temples have a gate opening on the south side of their site. Guests should enter from the southern entrance and exit through the northern entrance. Open doors mean that visitors are free to wander the site; however, if there are closed doors, individuals shouldn't try to open them. Closed doors are typically meant only to be entered by men and women who work at the temple.

Buying Incense

One common custom when visiting a holy Chinese site is to purchase a bundle of incense. These are usually sold just outside temples. Visitors may purchase a package of incense, light these items and hold them in both hands while they pray. There are often incense holders where worshipers can place their incense once they have finished praying.

Photos and Videos

Most temples do not allow photography taken with a flash. Some compounds don't allow any type of photography or videos to be taken. Always ask the guard or monk responsible if it's permitted to take a photo or a video prior to doing so.

Clothing

Men and women should wear tops that cover their shoulders when visiting a temple. Pants, shorts, and skirts should reach below the knee. Some religious sites might ask visitors to remove their shoes when entering. Dressing for temples in China can be casual. Women usually wear jeans and heels while men wear either jeans or slacks. Both men and women should avoid short-shorts, tank tops and clothing that reveals too much skin.

Behavior

Hats should be removed when entering a temple. Shoes sometimes need to also be removed, and visitors should look for a pile of shoes as an indication.

Guests should turn off their electronic devices and speak in low voices. Inappropriate conversations should be avoided at holy sites. People also shouldn't touch statues or point with their fingers. If they are sitting when a monk or nun enters a room, they should stand up to show respect. Finally, visitors should never eat at a sacred site.

Praying and worshiping

Visitors may join in praying or worshiping at temples. These actions should be genuine and not made in a mocking manner. If a group of people is sitting and praying, guests are usually welcome to join the group worshiping.

Donations

There is usually a donation box in every temple. Sometimes, there will also be food, candles and other items near a donation box. People should never touch these items. Also, donations are welcome and somewhat expected. A typical donation is $1 US.

Customs for Women

Women shouldn't touch monks especially at a Buddhist temple. If a woman touches a monk, he will be forced to fast and perform a cleansing ritual. Food, donations and gifts should be given first to a man, and then that man should give it to the monk with his right hand. Even a monk's mother must adhere to this rule and never touch a monk.

Special Customs

Visitors should enter a temple with their left foot first and exit with their right foot first. Additionally, the traditional way to greet a monk is to place both hands together as in prayer and perform a small bow.

Further Reading

China's Top 10 Temples and Monasteries
The Best Temples in Beijing
You Might Like




";


$config = new \crodas\TextRank\Config;
$config->addListener(new \crodas\TextRank\Stopword);
$analizer = new \crodas\TextRank\TextRank($config);
$keywords = $analizer->getKeywords(mb_strtolower($text));
print_r($keywords);
$analizer = new \crodas\TextRank\Summary($config);
$summary = $analizer->getSummary(mb_strtolower($text));         
print_r($summary);
