import ahocorasick
from pathlib import Path
intext = Path('xx_ciku_eng.txt')
patterns = [x.strip() for x in intext.read_text().splitlines()]
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) Cell In[4], line 1 ----> 1 patterns = [x.strip() for x in intext.read_text().splitlines()] File /opt/conda/lib/python3.12/pathlib.py:1027, in Path.read_text(self, encoding, errors) 1023 """ 1024 Open the file in text mode, read it, and close the file. 1025 """ 1026 encoding = io.text_encoding(encoding) -> 1027 with self.open(mode='r', encoding=encoding, errors=errors) as f: 1028 return f.read() File /opt/conda/lib/python3.12/pathlib.py:1013, in Path.open(self, mode, buffering, encoding, errors, newline) 1011 if "b" not in mode: 1012 encoding = io.text_encoding(encoding) -> 1013 return io.open(self, mode, buffering, encoding, errors, newline) FileNotFoundError: [Errno 2] No such file or directory: 'xx_ciku_eng.txt'
trie = ahocorasick.Automaton()
for index, word in enumerate(patterns):
trie.add_word(word, (index, word))
trie.make_automaton()
'London' in trie
True
iter(string, [start, [end]])
使用提供的输入执行 Aho-Corasick 搜索过程string。为在字符串中找到的键返回元组 (end_index, value) 的迭代器。
text = '''Paris, France remains one of the most loved cities to visit in the world because it is an iconic destination for grand life events, like milestone vacations, engagements, celebrations, and honeymoons. It is also an easy place to visit for quick getaways, with regular flight schedules and tours available.
Many travelers enjoy Paris for the art and go to see the galleries and museums, like the Louvre Museum and the Musee d'Orsay. Some travelers go to Paris because it is a bucket list destination for many people. They want to see the Eiffel Tower, the Notre Dame Cathedral, and the Arc de Triomphe in person.
Paris is notoriously a city of romance, so many marriage proposals happen frequently in Paris, and honeymooners enjoy vacationing with a romantic cruise down the Seine River.
The time of year you visit may determine some of your activities, but even in winter, there are plenty of things to do in Paris.
Read More: Top-Rated Tourist Attractions in Paris
2. New York City, USA
Central Park in New York City
Central Park in New York City
There are so many elements that make New York City one of the best cities in the world. The city and the Statue of Liberty that travelers see as they arrive is symbolic of the culture and freedom that America stands for. The Big Apple is the financial hub of the United States, with Wall Street and international businesses.
Most people visit New York City just to be a part of the city scene. It is where people go to make dreams come true, with experiences like seeing a Broadway show, watching the famous ball drop on New Year's Eve in Times Square, and taking part as a spectator watching the elaborate floats go by in the Thanksgiving Day parade.
The parks in New York City have their own draw. From the many attractions in Central Park to winter ice skating in Bryant Park, you can spend several days in the quiet natural retreats located throughout the concrete jungle.
New York City is where things happen, and travelers enjoy having a taste of that excitement. It's another one of those great bucket list destinations that you can visit at any time of year, even winter in NYC is fun.
Read More:
Top-Rated Tourist Attractions in New York City
Top-Rated Museums in New York City
3. London, England
Big Ben and Westminster Bridge in London
Big Ben and Westminster Bridge in London
There is never a lack of intrigue or interest in London as a destination which is makes it one of the most touristic cities in the world. The Royal intrigue is one of its main draws, as thousands of tourists descend on Buckingham Palace to get a brush with the British monarchy.
Millions of tourists visit London each year and tour the top attractions, like the Tower of London, Westminster Abbey, and St. Paul's Cathedral. Part of what makes London such a treat to visit is its public transport system, which makes it easy to get from one place to another without a car. With so much to see, it is easy to stay mobile in London to visit popular landmarks in a single day, like the Tower Bridge and the Skydeck at The Shard 800 feet above the city.
It is also possible to see many of London's top attractions on foot, with several great walking routes that take you through popular parks, landmarks, and neighborhoods.
Speaking of neighborhoods, London is revered for its diverse districts and famous markets, like the Borough Market, operating since the 13th century, and the Camden Market, with small stalls selling food and local goods.
4. Bangkok, Thailand
Wat Arun temple at dusk in Bangkok
Wat Arun temple at dusk in Bangkok
The bustling city of Bangkok, Thailand, is one of the top tourist cities in the world, with nearly 26 million visitors a year. The city is usually the first stopping point for anyone touring through Thailand.
Bangkok has an exciting mix of packed subways; huge skyscrapers; temples; historic architecture; lavish gardens; palaces like the Grand Palace; and almost nightly sporting events, like kickboxing, that draw thousands of fans.
Spend time on the beaches near Bangkok for a mix of the city scene and a tropical ocean escape.
Bangkok has a lively atmosphere, even during the daylight hours. Travelers on a budget can find cheap entertainment, shopping bargains, and low-cost accommodations, especially in the area of Khao San Road.
Travelers with unlimited budgets can find everything on the opposite end of the spectrum, from luxury hotels to extravagant shopping at high-end stores at the Siam Paragon Mall.
The city is also popular for more traditional experiences, like the floating markets and Thai massage parlors where you can get an hour of relaxation for less than $10 dollars.
Read More: Top-Rated Tourist Attractions in Bangkok
5. Hong Kong, China
Hong Kong
Hong Kong
Hong Kong is one of the most famous cities in the world. It is a convenient holiday destination, and its shopping, especially for bargains, is unmatched.
Hong Kong is one of the most popular cities in the world, but it is also one of the most expensive places to travel if you plan to stay in the heart of the city. If you stay just beyond the main tourist areas in places like Jordan or Kowloon, you can find slightly less expensive accommodations.
Some of the other reasons travelers flock to Hong Kong include an easy public transportation system, so there is no need to drive; massive theme parks; 24-hour dining; the world's largest skyscrapers; bargain shopping for high-end goods; and beaches and mountains that are quickly accessed just outside the city. You can even find beautiful hiking trails in Hong Kong.
Hong Kong also offers unusual finds that are just plain interesting, like a 24-karat solid gold toilet inside a Hong Kong jewelry company and a beautiful tunnel of pink flowers located inside the Un Chau Estate public housing complex.
Read More: Top-Rated Tourist Attractions in Hong Kong'''
for each in trie.iter_long(text):
print(each)
idx = each[0]
text_len = len(each[1][1])
print(text[ idx + 1 - text_len: idx + 1])
(4, (40912, 'Paris')) Paris (309, (2782, 'Man')) Man (332, (40912, 'Paris')) Paris (405, (3410, 'Mus')) Mus (420, (3410, 'Mus')) Mus (430, (29283, 'Orsay')) Orsay (434, (16312, 'So')) So (458, (40912, 'Paris')) Paris (563, (39993, 'Da')) Da (569, (27532, 'Cat')) Cat (618, (40912, 'Paris')) Paris (706, (40912, 'Paris')) Paris (916, (40912, 'Paris')) Paris (927, (33155, 'Mor')) Mor (968, (40912, 'Paris')) Paris (981, (11, 'New York')) New York (999, (28827, 'Central')) Central (1002, (30435, 'Pa')) Pa (1016, (11, 'New York')) New York (1029, (28827, 'Central')) Central (1032, (30435, 'Pa')) Pa (1046, (11, 'New York')) New York (1097, (11, 'New York')) New York (1174, (40744, 'Liberty')) Liberty (1339, (19567, 'Wall')) Wall (1346, (36618, 'Street')) Street (1382, (9115, 'Most')) Most (1404, (11, 'New York')) New York (1580, (15657, 'Ye')) Ye (1596, (24958, 'Time')) Time (1684, (12988, 'Than')) Than (1695, (39993, 'Da')) Da (1727, (11, 'New York')) New York (1790, (28827, 'Central')) Central (1793, (30435, 'Pa')) Pa (1827, (23982, 'Bryant')) Bryant (1830, (30435, 'Pa')) Pa (1940, (11, 'New York')) New York (2158, (33155, 'Mor')) Mor (2203, (11, 'New York')) New York (2222, (3410, 'Mus')) Mus (2238, (11, 'New York')) New York (2253, (40394, 'London')) London (2270, (34216, 'Ben')) Ben (2286, (24592, 'Westminster')) Westminster (2303, (40394, 'London')) London (2311, (34216, 'Ben')) Ben (2327, (24592, 'Westminster')) Westminster (2344, (40394, 'London')) London (2400, (40394, 'London')) London (2490, (13983, 'Roy')) Roy (2574, (34371, 'Buckingham')) Buckingham (2579, (47734, 'Pala')) Pala (2658, (40394, 'London')) London (2723, (40394, 'London')) London (2736, (24592, 'Westminster')) Westminster (2756, (2248, 'St. Paul')) St. Paul (2762, (27532, 'Cat')) Cat (2772, (30435, 'Pa')) Pa (2795, (40394, 'London')) London (2974, (40394, 'London')) London (3068, (46426, 'Shar')) Shar (3137, (40394, 'London')) London (3300, (40394, 'London')) London (3371, (16537, 'Boro')) Boro (3431, (39605, 'Camden')) Camden (3499, (15, 'Bangkok')) Bangkok (3512, (44074, 'Wa')) Wa (3517, (19672, 'Aru')) Aru (3544, (15, 'Bangkok')) Bangkok (3547, (44074, 'Wa')) Wa (3552, (19672, 'Aru')) Aru (3579, (15, 'Bangkok')) Bangkok (3608, (15, 'Bangkok')) Bangkok (3797, (15, 'Bangkok')) Bangkok (3924, (33122, 'Gran')) Gran (3930, (47734, 'Pala')) Pala (4055, (15, 'Bangkok')) Bangkok (4121, (15, 'Bangkok')) Bangkok (4313, (13266, 'San')) San (4489, (42452, 'Para')) Para (4686, (33155, 'Mor')) Mor (4729, (15, 'Bangkok')) Bangkok (4743, (67, 'Hong Kong')) Hong Kong (4750, (41442, 'China')) China (4760, (67, 'Hong Kong')) Hong Kong (4770, (67, 'Hong Kong')) Hong Kong (4780, (67, 'Hong Kong')) Hong Kong (4935, (67, 'Hong Kong')) Hong Kong (5156, (13842, 'Jordan')) Jordan (5167, (393, 'Kowloon')) Kowloon (5225, (16312, 'So')) So (5277, (67, 'Hong Kong')) Hong Kong (5590, (67, 'Hong Kong')) Hong Kong (5602, (67, 'Hong Kong')) Hong Kong (5714, (67, 'Hong Kong')) Hong Kong (5837, (33155, 'Mor')) Mor (5882, (67, 'Hong Kong')) Hong Kong
iter_long(string, [start, [end]])
返回搜索最长、非重叠匹配的迭代器(AutomatonSearchIterLong 类的对象)。
for each in trie.iter_long(text):
print(each)
(4, (40912, 'Paris')) (309, (2782, 'Man')) (332, (40912, 'Paris')) (405, (3410, 'Mus')) (420, (3410, 'Mus')) (430, (29283, 'Orsay')) (434, (16312, 'So')) (458, (40912, 'Paris')) (563, (39993, 'Da')) (569, (27532, 'Cat')) (618, (40912, 'Paris')) (706, (40912, 'Paris')) (916, (40912, 'Paris')) (927, (33155, 'Mor')) (968, (40912, 'Paris')) (981, (11, 'New York')) (999, (28827, 'Central')) (1002, (30435, 'Pa')) (1016, (11, 'New York')) (1029, (28827, 'Central')) (1032, (30435, 'Pa')) (1046, (11, 'New York')) (1097, (11, 'New York')) (1174, (40744, 'Liberty')) (1339, (19567, 'Wall')) (1346, (36618, 'Street')) (1382, (9115, 'Most')) (1404, (11, 'New York')) (1580, (15657, 'Ye')) (1596, (24958, 'Time')) (1684, (12988, 'Than')) (1695, (39993, 'Da')) (1727, (11, 'New York')) (1790, (28827, 'Central')) (1793, (30435, 'Pa')) (1827, (23982, 'Bryant')) (1830, (30435, 'Pa')) (1940, (11, 'New York')) (2158, (33155, 'Mor')) (2203, (11, 'New York')) (2222, (3410, 'Mus')) (2238, (11, 'New York')) (2253, (40394, 'London')) (2270, (34216, 'Ben')) (2286, (24592, 'Westminster')) (2303, (40394, 'London')) (2311, (34216, 'Ben')) (2327, (24592, 'Westminster')) (2344, (40394, 'London')) (2400, (40394, 'London')) (2490, (13983, 'Roy')) (2574, (34371, 'Buckingham')) (2579, (47734, 'Pala')) (2658, (40394, 'London')) (2723, (40394, 'London')) (2736, (24592, 'Westminster')) (2756, (2248, 'St. Paul')) (2762, (27532, 'Cat')) (2772, (30435, 'Pa')) (2795, (40394, 'London')) (2974, (40394, 'London')) (3068, (46426, 'Shar')) (3137, (40394, 'London')) (3300, (40394, 'London')) (3371, (16537, 'Boro')) (3431, (39605, 'Camden')) (3499, (15, 'Bangkok')) (3512, (44074, 'Wa')) (3517, (19672, 'Aru')) (3544, (15, 'Bangkok')) (3547, (44074, 'Wa')) (3552, (19672, 'Aru')) (3579, (15, 'Bangkok')) (3608, (15, 'Bangkok')) (3797, (15, 'Bangkok')) (3924, (33122, 'Gran')) (3930, (47734, 'Pala')) (4055, (15, 'Bangkok')) (4121, (15, 'Bangkok')) (4313, (13266, 'San')) (4489, (42452, 'Para')) (4686, (33155, 'Mor')) (4729, (15, 'Bangkok')) (4743, (67, 'Hong Kong')) (4750, (41442, 'China')) (4760, (67, 'Hong Kong')) (4770, (67, 'Hong Kong')) (4780, (67, 'Hong Kong')) (4935, (67, 'Hong Kong')) (5156, (13842, 'Jordan')) (5167, (393, 'Kowloon')) (5225, (16312, 'So')) (5277, (67, 'Hong Kong')) (5590, (67, 'Hong Kong')) (5602, (67, 'Hong Kong')) (5714, (67, 'Hong Kong')) (5837, (33155, 'Mor')) (5882, (67, 'Hong Kong'))
text[0:3]
'Par'
text[3:5]
'is'
text
"Paris, France remains one of the most loved cities to visit in the world because it is an iconic destination for grand life events, like milestone vacations, engagements, celebrations, and honeymoons. It is also an easy place to visit for quick getaways, with regular flight schedules and tours available.\n\nMany travelers enjoy Paris for the art and go to see the galleries and museums, like the Louvre Museum and the Musee d'Orsay. Some travelers go to Paris because it is a bucket list destination for many people. They want to see the Eiffel Tower, the Notre Dame Cathedral, and the Arc de Triomphe in person.\n\nParis is notoriously a city of romance, so many marriage proposals happen frequently in Paris, and honeymooners enjoy vacationing with a romantic cruise down the Seine River.\n\nThe time of year you visit may determine some of your activities, but even in winter, there are plenty of things to do in Paris.\n\nRead More: Top-Rated Tourist Attractions in Paris\n\n2. New York City, USA\nCentral Park in New York City\nCentral Park in New York City\nThere are so many elements that make New York City one of the best cities in the world. The city and the Statue of Liberty that travelers see as they arrive is symbolic of the culture and freedom that America stands for. The Big Apple is the financial hub of the United States, with Wall Street and international businesses.\n\nMost people visit New York City just to be a part of the city scene. It is where people go to make dreams come true, with experiences like seeing a Broadway show, watching the famous ball drop on New Year's Eve in Times Square, and taking part as a spectator watching the elaborate floats go by in the Thanksgiving Day parade.\n\nThe parks in New York City have their own draw. From the many attractions in Central Park to winter ice skating in Bryant Park, you can spend several days in the quiet natural retreats located throughout the concrete jungle.\n\nNew York City is where things happen, and travelers enjoy having a taste of that excitement. It's another one of those great bucket list destinations that you can visit at any time of year, even winter in NYC is fun.\n\nRead More:\n\nTop-Rated Tourist Attractions in New York City\nTop-Rated Museums in New York City\n3. London, England\nBig Ben and Westminster Bridge in London\nBig Ben and Westminster Bridge in London\nThere is never a lack of intrigue or interest in London as a destination which is makes it one of the most touristic cities in the world. The Royal intrigue is one of its main draws, as thousands of tourists descend on Buckingham Palace to get a brush with the British monarchy.\n\nMillions of tourists visit London each year and tour the top attractions, like the Tower of London, Westminster Abbey, and St. Paul's Cathedral. Part of what makes London such a treat to visit is its public transport system, which makes it easy to get from one place to another without a car. With so much to see, it is easy to stay mobile in London to visit popular landmarks in a single day, like the Tower Bridge and the Skydeck at The Shard 800 feet above the city.\n\nIt is also possible to see many of London's top attractions on foot, with several great walking routes that take you through popular parks, landmarks, and neighborhoods.\n\nSpeaking of neighborhoods, London is revered for its diverse districts and famous markets, like the Borough Market, operating since the 13th century, and the Camden Market, with small stalls selling food and local goods.\n\n4. Bangkok, Thailand\nWat Arun temple at dusk in Bangkok\nWat Arun temple at dusk in Bangkok\nThe bustling city of Bangkok, Thailand, is one of the top tourist cities in the world, with nearly 26 million visitors a year. The city is usually the first stopping point for anyone touring through Thailand.\n\nBangkok has an exciting mix of packed subways; huge skyscrapers; temples; historic architecture; lavish gardens; palaces like the Grand Palace; and almost nightly sporting events, like kickboxing, that draw thousands of fans.\n\nSpend time on the beaches near Bangkok for a mix of the city scene and a tropical ocean escape.\n\nBangkok has a lively atmosphere, even during the daylight hours. Travelers on a budget can find cheap entertainment, shopping bargains, and low-cost accommodations, especially in the area of Khao San Road.\n\nTravelers with unlimited budgets can find everything on the opposite end of the spectrum, from luxury hotels to extravagant shopping at high-end stores at the Siam Paragon Mall.\n\nThe city is also popular for more traditional experiences, like the floating markets and Thai massage parlors where you can get an hour of relaxation for less than $10 dollars.\n\nRead More: Top-Rated Tourist Attractions in Bangkok\n\n5. Hong Kong, China\nHong Kong\nHong Kong\nHong Kong is one of the most famous cities in the world. It is a convenient holiday destination, and its shopping, especially for bargains, is unmatched.\n\nHong Kong is one of the most popular cities in the world, but it is also one of the most expensive places to travel if you plan to stay in the heart of the city. If you stay just beyond the main tourist areas in places like Jordan or Kowloon, you can find slightly less expensive accommodations.\n\nSome of the other reasons travelers flock to Hong Kong include an easy public transportation system, so there is no need to drive; massive theme parks; 24-hour dining; the world's largest skyscrapers; bargain shopping for high-end goods; and beaches and mountains that are quickly accessed just outside the city. You can even find beautiful hiking trails in Hong Kong.\n\nHong Kong also offers unusual finds that are just plain interesting, like a 24-karat solid gold toilet inside a Hong Kong jewelry company and a beautiful tunnel of pink flowers located inside the Un Chau Estate public housing complex.\n\nRead More: Top-Rated Tourist Attractions in Hong Kong"
intext = text
outtext = ''
idx_q = 0
idx_h = 0
wlen_hou =0
wd_old = ''
idx_info_hou = []
idx_info = []
cnts = open('xx_idx.txt').readlines()
for each in trie.iter_long(text):
# print(each)
if idx_h >0 :
idx_q = idx_h
wd_old = wd
wlen_hou = wlen
idx_info_hou = idx_info
wd = each[1][1]
print(idx_info)
wlen = len(each[1][1])
idx_h = each[0]
idx_info = cnts[each[1][0] ].strip().split(';')
# print(type(each))
# print(type(each[0]))
# print(text[idx_h - wlen + 1: idx_h + 1])
text_seq = text[idx_q + wlen_hou -1 :idx_h + 1 - wlen]
# print( '=' * 40)
# print(idx_q + wlen,idx_h - wlen)
# print(text_seq)
# outtext = outtext + ' <<' + wd_old + '>> ' + text_seq
try:
outtext = outtext + f' :geofea:`{wd_old} <{idx_info_hou[2]}:{idx_info_hou[3]}>` ' + text_seq
except:
pass
outtext = outtext + text[idx_h:]
print(outtext)
[] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['2782', '河北省河间市', 'vt5697', '506'] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['3410', '河北高邑县', 'vt5697', '619'] ['3410', '河北高邑县', 'vt5697', '619'] ['29283', '北京市市辖区通州区梨园镇大稿村委会', 'vt9741', '3928'] ['16312', '高碑店地区高碑店西社区居委会', 'vt9741', '685'] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['39993', '市辖区河南寨镇山口庄村民委员会', 'vt9741', '6605'] ['27532', '张家湾镇张辛庄村委会', 'vt9741', '3490'] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['33155', '北京市市辖区昌平区南邵镇长滩庭苑社区居委会', 'vt9741', '4896'] ['40912', '新城子镇花园村民委员会', 'vt9741', '6835'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['28827', '北京市市辖区通州区潞城镇辛安屯村委会', 'vt9741', '3814'] ['30435', '北京市市辖区顺义区双丰街道西马坡村委会', 'vt9741', '4216'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['28827', '北京市市辖区通州区潞城镇辛安屯村委会', 'vt9741', '3814'] ['30435', '北京市市辖区顺义区双丰街道西马坡村委会', 'vt9741', '4216'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['40744', '大城子镇张庄子村民委员会', 'vt9741', '6793'] ['19567', '北京市市辖区丰台区青塔街道春园社区', 'vt9741', '1499'] ['36618', '北京市市辖区长子营镇郑二营村村委会', 'vt9741', '5761'] ['9115', '江西武宁', 'vt5697', '1618'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['15657', '市辖区小关街道惠新苑社区居委会', 'vt9741', '521'] ['24958', '北京市市辖区拱辰街道飞机场社区居委会', 'vt9741', '2846'] ['12988', '广东信宜县', 'vt5697', '2303'] ['39993', '市辖区河南寨镇山口庄村民委员会', 'vt9741', '6605'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['28827', '北京市市辖区通州区潞城镇辛安屯村委会', 'vt9741', '3814'] ['30435', '北京市市辖区顺义区双丰街道西马坡村委会', 'vt9741', '4216'] ['23982', '北京市市辖区斋堂镇法城村委会', 'vt9741', '2602'] ['30435', '北京市市辖区顺义区双丰街道西马坡村委会', 'vt9741', '4216'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['33155', '北京市市辖区昌平区南邵镇长滩庭苑社区居委会', 'vt9741', '4896'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['3410', '河北高邑县', 'vt5697', '619'] ['11', '黑龙江省塔河', 'vt5697', '2'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['34216', '亦庄地区贵园东里社区居委会', 'vt9741', '5161'] ['24592', '周口店地区金巢社区居委会', 'vt9741', '2755'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['34216', '亦庄地区贵园东里社区居委会', 'vt9741', '5161'] ['24592', '周口店地区金巢社区居委会', 'vt9741', '2755'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['13983', '北京市市辖区东城区崇文门外街道新世界家园社区居委会', 'vt9741', '103'] ['34371', '北京市市辖区大兴区黄村地区大庄村村委会', 'vt9741', '5200'] ['47734', '天津市市辖区双林街道三宝社区居委会', 'vt9741', '8540'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['24592', '周口店地区金巢社区居委会', 'vt9741', '2755'] ['2248', '河北省滦县', 'vt5697', '409'] ['27532', '张家湾镇张辛庄村委会', 'vt9741', '3490'] ['30435', '北京市市辖区顺义区双丰街道西马坡村委会', 'vt9741', '4216'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['46426', '天津市市辖区东丽湖街道绿洲花园社区居委会', 'vt9741', '8213'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['40394', '北京市市辖区高岭镇高岭村民委员会', 'vt9741', '6705'] ['16537', '市辖区大屯街道嘉铭园社区居委会', 'vt9741', '741'] ['39605', '市辖区溪翁庄镇溪翁庄村民委员会', 'vt9741', '6508'] ['15', '呼玛县', 'vt5697', '4'] ['44074', '天津市市辖区尖山街道光华里社区居委会', 'vt9741', '7625'] ['19672', '王佐镇翡翠山社区', 'vt9741', '1525'] ['15', '呼玛县', 'vt5697', '4'] ['44074', '天津市市辖区尖山街道光华里社区居委会', 'vt9741', '7625'] ['19672', '王佐镇翡翠山社区', 'vt9741', '1525'] ['15', '呼玛县', 'vt5697', '4'] ['15', '呼玛县', 'vt5697', '4'] ['15', '呼玛县', 'vt5697', '4'] ['33122', '北京市市辖区小汤山镇常兴庄村委会', 'vt9741', '4887'] ['47734', '天津市市辖区双林街道三宝社区居委会', 'vt9741', '8540'] ['15', '呼玛县', 'vt5697', '4'] ['15', '呼玛县', 'vt5697', '4'] ['13266', '陵水黎族苗族自治', 'vt5697', '2350'] ['42452', '大庄科乡台自沟村委会', 'vt9741', '7220'] ['33155', '北京市市辖区昌平区南邵镇长滩庭苑社区居委会', 'vt9741', '4896'] ['15', '呼玛县', 'vt5697', '4'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['41442', '北京市市辖区康庄镇大营村委会', 'vt9741', '6967'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['13842', '北京市市辖区建国门街道东总布社区居委会', 'vt9741', '67'] ['393', '望奎', 'vt5697', '71'] ['16312', '高碑店地区高碑店西社区居委会', 'vt9741', '685'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['67', '黑龙江孙吴', 'vt5697', '13'] ['33155', '北京市市辖区昌平区南邵镇长滩庭苑社区居委会', 'vt9741', '4896'] :geofea:`Paris <vt9741:6835>` rance remains one of the most loved cities to visit in the world because it is an iconic destination for grand life events, like milestone vacations, engagements, celebrations, and honeymoons. It is also an easy place to visit for quick getaways, with regular flight schedules and tours available. :geofea:`Man <vt5697:506>` travelers enjoy :geofea:`Paris <vt9741:6835>` r the art and go to see the galleries and museums, like the Louvre :geofea:`Mus <vt5697:619>` um and the :geofea:`Mus <vt5697:619>` e d' :geofea:`Orsay <vt9741:3928>` :geofea:`So <vt9741:685>` me travelers go to :geofea:`Paris <vt9741:6835>` cause it is a bucket list destination for many people. They want to see the Eiffel Tower, the Notre :geofea:`Da <vt9741:6605>` me :geofea:`Cat <vt9741:3490>` edral, and the Arc de Triomphe in person. :geofea:`Paris <vt9741:6835>` notoriously a city of romance, so many marriage proposals happen frequently in :geofea:`Paris <vt9741:6835>` nd honeymooners enjoy vacationing with a romantic cruise down the Seine River. The time of year you visit may determine some of your activities, but even in winter, there are plenty of things to do in :geofea:`Paris <vt9741:6835>` Read :geofea:`Mor <vt9741:4896>` : Top-Rated Tourist Attractions in :geofea:`Paris <vt9741:6835>` . :geofea:`New York <vt5697:2>` USA :geofea:`Central <vt9741:3814>` :geofea:`Pa <vt9741:4216>` rk in :geofea:`New York <vt5697:2>` :geofea:`Central <vt9741:3814>` :geofea:`Pa <vt9741:4216>` rk in :geofea:`New York <vt5697:2>` There are so many elements that make :geofea:`New York <vt5697:2>` one of the best cities in the world. The city and the Statue of :geofea:`Liberty <vt9741:6793>` travelers see as they arrive is symbolic of the culture and freedom that America stands for. The Big Apple is the financial hub of the United States, with :geofea:`Wall <vt9741:1499>` :geofea:`Street <vt9741:5761>` international businesses. :geofea:`Most <vt5697:1618>` eople visit :geofea:`New York <vt5697:2>` just to be a part of the city scene. It is where people go to make dreams come true, with experiences like seeing a Broadway show, watching the famous ball drop on New :geofea:`Ye <vt9741:521>` ar's Eve in :geofea:`Time <vt9741:2846>` Square, and taking part as a spectator watching the elaborate floats go by in the :geofea:`Than <vt5697:2303>` giving :geofea:`Da <vt9741:6605>` y parade. The parks in :geofea:`New York <vt5697:2>` have their own draw. From the many attractions in :geofea:`Central <vt9741:3814>` :geofea:`Pa <vt9741:4216>` rk to winter ice skating in :geofea:`Bryant <vt9741:2602>` :geofea:`Pa <vt9741:4216>` rk, you can spend several days in the quiet natural retreats located throughout the concrete jungle. :geofea:`New York <vt5697:2>` is where things happen, and travelers enjoy having a taste of that excitement. It's another one of those great bucket list destinations that you can visit at any time of year, even winter in NYC is fun. Read :geofea:`Mor <vt9741:4896>` : Top-Rated Tourist Attractions in :geofea:`New York <vt5697:2>` Top-Rated :geofea:`Mus <vt5697:619>` ums in :geofea:`New York <vt5697:2>` 3. :geofea:`London <vt9741:6705>` gland Big :geofea:`Ben <vt9741:5161>` and :geofea:`Westminster <vt9741:2755>` n :geofea:`London <vt9741:6705>` :geofea:`Ben <vt9741:5161>` and :geofea:`Westminster <vt9741:2755>` n :geofea:`London <vt9741:6705>` re is never a lack of intrigue or interest in :geofea:`London <vt9741:6705>` a destination which is makes it one of the most touristic cities in the world. The :geofea:`Roy <vt9741:103>` l intrigue is one of its main draws, as thousands of tourists descend on :geofea:`Buckingham <vt9741:5200>` :geofea:`Pala <vt9741:8540>` to get a brush with the British monarchy. Millions of tourists visit :geofea:`London <vt9741:6705>` h year and tour the top attractions, like the Tower of :geofea:`London <vt9741:6705>` :geofea:`Westminster <vt9741:2755>` nd :geofea:`St. Paul <vt5697:409>` :geofea:`Cat <vt9741:3490>` edral. :geofea:`Pa <vt9741:4216>` rt of what makes :geofea:`London <vt9741:6705>` h a treat to visit is its public transport system, which makes it easy to get from one place to another without a car. With so much to see, it is easy to stay mobile in :geofea:`London <vt9741:6705>` visit popular landmarks in a single day, like the Tower Bridge and the Skydeck at The :geofea:`Shar <vt9741:8213>` 800 feet above the city. It is also possible to see many of :geofea:`London <vt9741:6705>` op attractions on foot, with several great walking routes that take you through popular parks, landmarks, and neighborhoods. Speaking of neighborhoods, :geofea:`London <vt9741:6705>` revered for its diverse districts and famous markets, like the :geofea:`Boro <vt9741:741>` h Market, operating since the 13th century, and the :geofea:`Camden <vt9741:6508>` ket, with small stalls selling food and local goods. 4. :geofea:`Bangkok <vt5697:4>` iland :geofea:`Wa <vt9741:7625>` t :geofea:`Aru <vt9741:1525>` temple at dusk in :geofea:`Bangkok <vt5697:4>` :geofea:`Wa <vt9741:7625>` t :geofea:`Aru <vt9741:1525>` temple at dusk in :geofea:`Bangkok <vt5697:4>` bustling city of :geofea:`Bangkok <vt5697:4>` iland, is one of the top tourist cities in the world, with nearly 26 million visitors a year. The city is usually the first stopping point for anyone touring through Thailand. :geofea:`Bangkok <vt5697:4>` an exciting mix of packed subways; huge skyscrapers; temples; historic architecture; lavish gardens; palaces like the :geofea:`Gran <vt9741:4887>` :geofea:`Pala <vt9741:8540>` ; and almost nightly sporting events, like kickboxing, that draw thousands of fans. Spend time on the beaches near :geofea:`Bangkok <vt5697:4>` a mix of the city scene and a tropical ocean escape. :geofea:`Bangkok <vt5697:4>` a lively atmosphere, even during the daylight hours. Travelers on a budget can find cheap entertainment, shopping bargains, and low-cost accommodations, especially in the area of Khao :geofea:`San <vt5697:2350>` Road. Travelers with unlimited budgets can find everything on the opposite end of the spectrum, from luxury hotels to extravagant shopping at high-end stores at the Siam :geofea:`Para <vt9741:7220>` n Mall. The city is also popular for more traditional experiences, like the floating markets and Thai massage parlors where you can get an hour of relaxation for less than $10 dollars. Read :geofea:`Mor <vt9741:4896>` : Top-Rated Tourist Attractions in :geofea:`Bangkok <vt5697:4>` :geofea:`Hong Kong <vt5697:13>` :geofea:`China <vt9741:6967>` :geofea:`Hong Kong <vt5697:13>` :geofea:`Hong Kong <vt5697:13>` :geofea:`Hong Kong <vt5697:13>` of the most famous cities in the world. It is a convenient holiday destination, and its shopping, especially for bargains, is unmatched. :geofea:`Hong Kong <vt5697:13>` of the most popular cities in the world, but it is also one of the most expensive places to travel if you plan to stay in the heart of the city. If you stay just beyond the main tourist areas in places like :geofea:`Jordan <vt9741:67>` :geofea:`Kowloon <vt5697:71>` can find slightly less expensive accommodations. :geofea:`So <vt9741:685>` me of the other reasons travelers flock to :geofea:`Hong Kong <vt5697:13>` e an easy public transportation system, so there is no need to drive; massive theme parks; 24-hour dining; the world's largest skyscrapers; bargain shopping for high-end goods; and beaches and mountains that are quickly accessed just outside the city. You can even find beautiful hiking trails in :geofea:`Hong Kong <vt5697:13>` :geofea:`Hong Kong <vt5697:13>` ffers unusual finds that are just plain interesting, like a 24-karat solid gold toilet inside a :geofea:`Hong Kong <vt5697:13>` y company and a beautiful tunnel of pink flowers located inside the Un Chau Estate public housing complex. Read :geofea:`Mor <vt9741:4896>` : Top-Rated Tourist Attractions in g
print(text)
Paris, France remains one of the most loved cities to visit in the world because it is an iconic destination for grand life events, like milestone vacations, engagements, celebrations, and honeymoons. It is also an easy place to visit for quick getaways, with regular flight schedules and tours available. Many travelers enjoy Paris for the art and go to see the galleries and museums, like the Louvre Museum and the Musee d'Orsay. Some travelers go to Paris because it is a bucket list destination for many people. They want to see the Eiffel Tower, the Notre Dame Cathedral, and the Arc de Triomphe in person. Paris is notoriously a city of romance, so many marriage proposals happen frequently in Paris, and honeymooners enjoy vacationing with a romantic cruise down the Seine River. The time of year you visit may determine some of your activities, but even in winter, there are plenty of things to do in Paris. Read More: Top-Rated Tourist Attractions in Paris 2. New York City, USA Central Park in New York City Central Park in New York City There are so many elements that make New York City one of the best cities in the world. The city and the Statue of Liberty that travelers see as they arrive is symbolic of the culture and freedom that America stands for. The Big Apple is the financial hub of the United States, with Wall Street and international businesses. Most people visit New York City just to be a part of the city scene. It is where people go to make dreams come true, with experiences like seeing a Broadway show, watching the famous ball drop on New Year's Eve in Times Square, and taking part as a spectator watching the elaborate floats go by in the Thanksgiving Day parade. The parks in New York City have their own draw. From the many attractions in Central Park to winter ice skating in Bryant Park, you can spend several days in the quiet natural retreats located throughout the concrete jungle. New York City is where things happen, and travelers enjoy having a taste of that excitement. It's another one of those great bucket list destinations that you can visit at any time of year, even winter in NYC is fun. Read More: Top-Rated Tourist Attractions in New York City Top-Rated Museums in New York City 3. London, England Big Ben and Westminster Bridge in London Big Ben and Westminster Bridge in London There is never a lack of intrigue or interest in London as a destination which is makes it one of the most touristic cities in the world. The Royal intrigue is one of its main draws, as thousands of tourists descend on Buckingham Palace to get a brush with the British monarchy. Millions of tourists visit London each year and tour the top attractions, like the Tower of London, Westminster Abbey, and St. Paul's Cathedral. Part of what makes London such a treat to visit is its public transport system, which makes it easy to get from one place to another without a car. With so much to see, it is easy to stay mobile in London to visit popular landmarks in a single day, like the Tower Bridge and the Skydeck at The Shard 800 feet above the city. It is also possible to see many of London's top attractions on foot, with several great walking routes that take you through popular parks, landmarks, and neighborhoods. Speaking of neighborhoods, London is revered for its diverse districts and famous markets, like the Borough Market, operating since the 13th century, and the Camden Market, with small stalls selling food and local goods. 4. Bangkok, Thailand Wat Arun temple at dusk in Bangkok Wat Arun temple at dusk in Bangkok The bustling city of Bangkok, Thailand, is one of the top tourist cities in the world, with nearly 26 million visitors a year. The city is usually the first stopping point for anyone touring through Thailand. Bangkok has an exciting mix of packed subways; huge skyscrapers; temples; historic architecture; lavish gardens; palaces like the Grand Palace; and almost nightly sporting events, like kickboxing, that draw thousands of fans. Spend time on the beaches near Bangkok for a mix of the city scene and a tropical ocean escape. Bangkok has a lively atmosphere, even during the daylight hours. Travelers on a budget can find cheap entertainment, shopping bargains, and low-cost accommodations, especially in the area of Khao San Road. Travelers with unlimited budgets can find everything on the opposite end of the spectrum, from luxury hotels to extravagant shopping at high-end stores at the Siam Paragon Mall. The city is also popular for more traditional experiences, like the floating markets and Thai massage parlors where you can get an hour of relaxation for less than $10 dollars. Read More: Top-Rated Tourist Attractions in Bangkok 5. Hong Kong, China Hong Kong Hong Kong Hong Kong is one of the most famous cities in the world. It is a convenient holiday destination, and its shopping, especially for bargains, is unmatched. Hong Kong is one of the most popular cities in the world, but it is also one of the most expensive places to travel if you plan to stay in the heart of the city. If you stay just beyond the main tourist areas in places like Jordan or Kowloon, you can find slightly less expensive accommodations. Some of the other reasons travelers flock to Hong Kong include an easy public transportation system, so there is no need to drive; massive theme parks; 24-hour dining; the world's largest skyscrapers; bargain shopping for high-end goods; and beaches and mountains that are quickly accessed just outside the city. You can even find beautiful hiking trails in Hong Kong. Hong Kong also offers unusual finds that are just plain interesting, like a 24-karat solid gold toilet inside a Hong Kong jewelry company and a beautiful tunnel of pink flowers located inside the Un Chau Estate public housing complex. Read More: Top-Rated Tourist Attractions in Hong Kong